in_process_context_factory.h revision a1401311d1ab56c4ed0a474bd38c108f75cb0cd9
1// Copyright 2014 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#ifndef UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ 6#define UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ 7 8#include "ui/compositor/compositor.h" 9 10namespace webkit { 11namespace gpu { 12class ContextProviderInProcess; 13} 14} 15 16namespace ui { 17 18class InProcessContextFactory : public ContextFactory { 19 public: 20 InProcessContextFactory(); 21 virtual ~InProcessContextFactory(); 22 23 // ContextFactory implementation 24 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface( 25 Compositor* compositor, 26 bool software_fallback) OVERRIDE; 27 28 virtual scoped_refptr<Reflector> CreateReflector( 29 Compositor* mirrored_compositor, 30 Layer* mirroring_layer) OVERRIDE; 31 virtual void RemoveReflector(scoped_refptr<Reflector> reflector) OVERRIDE; 32 33 virtual scoped_refptr<cc::ContextProvider> 34 OffscreenCompositorContextProvider() OVERRIDE; 35 virtual scoped_refptr<cc::ContextProvider> SharedMainThreadContextProvider() 36 OVERRIDE; 37 virtual void RemoveCompositor(Compositor* compositor) OVERRIDE; 38 virtual bool DoesCreateTestContexts() OVERRIDE; 39 40 private: 41 scoped_refptr<webkit::gpu::ContextProviderInProcess> 42 offscreen_compositor_contexts_; 43 scoped_refptr<webkit::gpu::ContextProviderInProcess> 44 shared_main_thread_contexts_; 45 46 DISALLOW_COPY_AND_ASSIGN(InProcessContextFactory); 47}; 48 49} // namespace ui 50 51#endif // UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ 52