Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: content/browser/aura/image_transport_factory.h

Issue 45963003: Move test-only ContextFactory implementations out of production targets (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert bad ui/base changes Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_AURA_IMAGE_TRANSPORT_FACTORY_H_ 5 #ifndef CONTENT_BROWSER_AURA_IMAGE_TRANSPORT_FACTORY_H_
6 #define CONTENT_BROWSER_AURA_IMAGE_TRANSPORT_FACTORY_H_ 6 #define CONTENT_BROWSER_AURA_IMAGE_TRANSPORT_FACTORY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h"
11 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
12 #include "ui/gfx/native_widget_types.h" 13 #include "ui/gfx/native_widget_types.h"
13 14
14 namespace gfx { 15 namespace gfx {
15 class Size; 16 class Size;
16 } 17 }
17 18
18 namespace ui { 19 namespace ui {
19 class ContextFactory; 20 class ContextFactory;
20 class Texture; 21 class Texture;
(...skipping 24 matching lines...) Expand all
45 // cross-process image transport, both for creating the shared surface handle 46 // cross-process image transport, both for creating the shared surface handle
46 // (destination surface for the GPU process) and the transport client (logic for 47 // (destination surface for the GPU process) and the transport client (logic for
47 // using that surface as a texture). The factory is a process-wide singleton. 48 // using that surface as a texture). The factory is a process-wide singleton.
48 class CONTENT_EXPORT ImageTransportFactory { 49 class CONTENT_EXPORT ImageTransportFactory {
49 public: 50 public:
50 virtual ~ImageTransportFactory() {} 51 virtual ~ImageTransportFactory() {}
51 52
52 // Initializes the global transport factory. 53 // Initializes the global transport factory.
53 static void Initialize(); 54 static void Initialize();
54 55
55 // Initializes the global transport factory for unit tests, using a test 56 // Initializes the global transport factory for unit tests using the provided
56 // context. 57 // context factory.
57 static void InitializeForUnitTests(); 58 static void InitializeForUnitTests(
59 scoped_ptr<ui::ContextFactory> test_factory);
58 60
59 // Terminates the global transport factory. 61 // Terminates the global transport factory.
60 static void Terminate(); 62 static void Terminate();
61 63
62 // Gets the factory instance. 64 // Gets the factory instance.
63 static ImageTransportFactory* GetInstance(); 65 static ImageTransportFactory* GetInstance();
64 66
65 // Gets the image transport factory as a context factory for the compositor. 67 // Gets the image transport factory as a context factory for the compositor.
66 virtual ui::ContextFactory* AsContextFactory() = 0; 68 virtual ui::ContextFactory* AsContextFactory() = 0;
67 69
(...skipping 27 matching lines...) Expand all
95 // Blocks waiting for the sync point on the service side. 97 // Blocks waiting for the sync point on the service side.
96 virtual void WaitSyncPoint(uint32 sync_point) = 0; 98 virtual void WaitSyncPoint(uint32 sync_point) = 0;
97 99
98 virtual void AddObserver(ImageTransportFactoryObserver* observer) = 0; 100 virtual void AddObserver(ImageTransportFactoryObserver* observer) = 0;
99 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) = 0; 101 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) = 0;
100 }; 102 };
101 103
102 } // namespace content 104 } // namespace content
103 105
104 #endif // CONTENT_BROWSER_AURA_IMAGE_TRANSPORT_FACTORY_H_ 106 #endif // CONTENT_BROWSER_AURA_IMAGE_TRANSPORT_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698