| Index: content/browser/renderer_host/compositor_impl_android.h
|
| diff --git a/content/browser/renderer_host/compositor_impl_android.h b/content/browser/renderer_host/compositor_impl_android.h
|
| index 04ae395424fb14193fa4bd15e35d5a6983cc1e65..1ac38d118d23a7c9802d19fb51f979c557de5f63 100644
|
| --- a/content/browser/renderer_host/compositor_impl_android.h
|
| +++ b/content/browser/renderer_host/compositor_impl_android.h
|
| @@ -9,6 +9,7 @@
|
| #include "base/compiler_specific.h"
|
| #include "base/containers/scoped_ptr_hash_map.h"
|
| #include "base/memory/scoped_ptr.h"
|
| +#include "base/observer_list.h"
|
| #include "cc/resources/ui_resource_client.h"
|
| #include "cc/trees/layer_tree_host_client.h"
|
| #include "cc/trees/layer_tree_host_single_thread_client.h"
|
| @@ -28,6 +29,7 @@ class ScopedUIResource;
|
|
|
| namespace content {
|
| class CompositorClient;
|
| +class CompositorObserver;
|
| class GraphicsContext;
|
|
|
| // -----------------------------------------------------------------------------
|
| @@ -81,7 +83,7 @@ class CONTENT_EXPORT CompositorImpl
|
| OVERRIDE;
|
| virtual void DidInitializeOutputSurface(bool success) OVERRIDE {}
|
| virtual void WillCommit() OVERRIDE {}
|
| - virtual void DidCommit() OVERRIDE {}
|
| + virtual void DidCommit() OVERRIDE;
|
| virtual void DidCommitAndDrawFrame() OVERRIDE {}
|
| virtual void DidCompleteSwapBuffers() OVERRIDE;
|
| virtual scoped_refptr<cc::ContextProvider>
|
| @@ -95,6 +97,12 @@ class CONTENT_EXPORT CompositorImpl
|
| // ImageTransportFactoryAndroidObserver implementation.
|
| virtual void OnLostResources() OVERRIDE;
|
|
|
| + // Compositor does not own observers. It is the responsibility of the
|
| + // observer to remove itself when it is done observing.
|
| + virtual void AddObserver(CompositorObserver* observer) OVERRIDE;
|
| + virtual void RemoveObserver(CompositorObserver* observer) OVERRIDE;
|
| + virtual bool HasObserver(CompositorObserver* observer) OVERRIDE;
|
| +
|
| private:
|
| blink::WebGLId BuildBasicTexture();
|
| blink::WGC3Denum GetGLFormatForBitmap(gfx::JavaBitmap& bitmap);
|
| @@ -117,6 +125,8 @@ class CONTENT_EXPORT CompositorImpl
|
| UIResourceMap;
|
| UIResourceMap ui_resource_map_;
|
|
|
| + ObserverList<CompositorObserver> observer_list_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(CompositorImpl);
|
| };
|
|
|
|
|