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

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

Issue 369923003: NoTransportImageTransportFactory is compiled into only test targets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mac build. merge same condition in gyp. Created 6 years, 5 months 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_ 5 #ifndef CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_
6 #define CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_ 6 #define CONTENT_BROWSER_COMPOSITOR_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"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // 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.
49 class CONTENT_EXPORT ImageTransportFactory { 49 class CONTENT_EXPORT ImageTransportFactory {
50 public: 50 public:
51 virtual ~ImageTransportFactory() {} 51 virtual ~ImageTransportFactory() {}
52 52
53 // Initializes the global transport factory. 53 // Initializes the global transport factory.
54 static void Initialize(); 54 static void Initialize();
55 55
56 // Initializes the global transport factory for unit tests using the provided 56 // Initializes the global transport factory for unit tests using the provided
57 // context factory. 57 // context factory.
58 static void InitializeForUnitTests( 58 static void InitializeForUnitTests(ImageTransportFactory* factory);
danakj 2014/07/07 16:52:27 use scoped_ptr please
59 scoped_ptr<ui::ContextFactory> test_factory);
60 59
61 // Terminates the global transport factory. 60 // Terminates the global transport factory.
62 static void Terminate(); 61 static void Terminate();
63 62
64 // Gets the factory instance. 63 // Gets the factory instance.
65 static ImageTransportFactory* GetInstance(); 64 static ImageTransportFactory* GetInstance();
66 65
67 // Gets the image transport factory as a context factory for the compositor. 66 // Gets the image transport factory as a context factory for the compositor.
68 virtual ui::ContextFactory* GetContextFactory() = 0; 67 virtual ui::ContextFactory* GetContextFactory() = 0;
69 68
70 virtual gfx::GLSurfaceHandle GetSharedSurfaceHandle() = 0; 69 virtual gfx::GLSurfaceHandle GetSharedSurfaceHandle() = 0;
71 70
72 // Gets a GLHelper instance, associated with the shared context. This 71 // Gets a GLHelper instance, associated with the shared context. This
73 // GLHelper will get destroyed whenever the shared context is lost 72 // GLHelper will get destroyed whenever the shared context is lost
74 // (ImageTransportFactoryObserver::OnLostResources is called). 73 // (ImageTransportFactoryObserver::OnLostResources is called).
75 virtual GLHelper* GetGLHelper() = 0; 74 virtual GLHelper* GetGLHelper() = 0;
76 75
77 virtual void AddObserver(ImageTransportFactoryObserver* observer) = 0; 76 virtual void AddObserver(ImageTransportFactoryObserver* observer) = 0;
78 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) = 0; 77 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) = 0;
79 78
80 #if defined(OS_MACOSX) 79 #if defined(OS_MACOSX)
81 virtual void OnSurfaceDisplayed(int surface_id) = 0; 80 virtual void OnSurfaceDisplayed(int surface_id) = 0;
82 #endif 81 #endif
83 }; 82 };
84 83
85 } // namespace content 84 } // namespace content
86 85
87 #endif // CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_ 86 #endif // CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/compositor/image_transport_factory.cc » ('j') | content/content_tests.gypi » ('J')

Powered by Google App Engine
This is Rietveld 408576698