- remove mojo_view_manager_lib_unittests from chrome_tests.py
[chromium-blink-merge.git] / content / browser / renderer_host / image_transport_factory_android.h
blob256238114066602a06305f2780dfbad202aa3553
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_FACTORY_ANDROID_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_FACTORY_ANDROID_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "content/common/content_export.h"
10 #include "ui/gfx/native_widget_types.h"
12 namespace gfx {
13 class GLShareGroup;
16 namespace gpu {
17 namespace gles2 {
18 class GLES2Interface;
22 namespace content {
23 class GLHelper;
24 class GLContextLostListener;
26 class ImageTransportFactoryAndroidObserver {
27 public:
28 virtual ~ImageTransportFactoryAndroidObserver() {}
29 virtual void OnLostResources() = 0;
32 class CONTENT_EXPORT ImageTransportFactoryAndroid {
33 public:
34 virtual ~ImageTransportFactoryAndroid();
36 // Initializes the global transport factory for unit tests.
37 static void InitializeForUnitTests(
38 scoped_ptr<ImageTransportFactoryAndroid> test_factory);
39 // Terminates the global transport factory for unit tests.
40 static void TerminateForUnitTests();
42 static ImageTransportFactoryAndroid* GetInstance();
44 virtual GLHelper* GetGLHelper() = 0;
45 virtual uint32 GetChannelID() = 0;
47 static void AddObserver(ImageTransportFactoryAndroidObserver* observer);
48 static void RemoveObserver(ImageTransportFactoryAndroidObserver* observer);
50 protected:
51 ImageTransportFactoryAndroid();
53 scoped_ptr<GLContextLostListener> context_lost_listener_;
56 } // namespace content
58 #endif // CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_FACTORY_ANDROID_H_