| Index: content/browser/android/in_process/synchronous_compositor_impl.h
|
| diff --git a/content/renderer/android/synchronous_compositor_impl.h b/content/browser/android/in_process/synchronous_compositor_impl.h
|
| similarity index 67%
|
| rename from content/renderer/android/synchronous_compositor_impl.h
|
| rename to content/browser/android/in_process/synchronous_compositor_impl.h
|
| index 35317b7ee3b4932dad689ef38e42b4e9be04d4ab..cec36386edd72f3724d4bd5db60de361da771de9 100644
|
| --- a/content/renderer/android/synchronous_compositor_impl.h
|
| +++ b/content/browser/android/in_process/synchronous_compositor_impl.h
|
| @@ -2,15 +2,16 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_IMPL_H_
|
| -#define CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_IMPL_H_
|
| +#ifndef CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_IMPL_H_
|
| +#define CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_IMPL_H_
|
|
|
| #include "base/basictypes.h"
|
| #include "base/compiler_specific.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "cc/input/layer_scroll_offset_delegate.h"
|
| +#include "content/browser/android/in_process/synchronous_compositor_output_surface.h"
|
| +#include "content/public/browser/web_contents_user_data.h"
|
| #include "content/public/renderer/android/synchronous_compositor.h"
|
| -#include "content/renderer/android/synchronous_compositor_output_surface.h"
|
|
|
| namespace cc {
|
| class OutputSurface;
|
| @@ -25,12 +26,12 @@ namespace content {
|
| // from the Compositor thread.
|
| class SynchronousCompositorImpl
|
| : public SynchronousCompositor,
|
| - public SynchronousCompositorOutputSurfaceDelegate {
|
| + public SynchronousCompositorOutputSurfaceDelegate,
|
| + public WebContentsUserData<SynchronousCompositorImpl> {
|
| public:
|
| - explicit SynchronousCompositorImpl(int32 routing_id);
|
| - virtual ~SynchronousCompositorImpl();
|
| + static void InitFactory();
|
|
|
| - scoped_ptr<cc::OutputSurface> CreateOutputSurface();
|
| + virtual ~SynchronousCompositorImpl();
|
|
|
| // SynchronousCompositor
|
| virtual bool IsHwReady() OVERRIDE;
|
| @@ -44,19 +45,26 @@ class SynchronousCompositorImpl
|
|
|
| // SynchronousCompositorOutputSurfaceDelegate
|
| virtual void SetContinuousInvalidate(bool enable) OVERRIDE;
|
| - virtual void DidCreateSynchronousOutputSurface() OVERRIDE;
|
| virtual void DidDestroySynchronousOutputSurface() OVERRIDE;
|
|
|
| + static void DidBindOutputSurface(
|
| + int routing_id, SynchronousCompositorOutputSurface* output_surface);
|
| +
|
| private:
|
| + explicit SynchronousCompositorImpl(WebContents* contents);
|
| +
|
| + void DidCreateSynchronousOutputSurface(
|
| + SynchronousCompositorOutputSurface* output_surface);
|
| bool CalledOnValidThread() const;
|
|
|
| int routing_id_;
|
| SynchronousCompositorClient* compositor_client_;
|
| SynchronousCompositorOutputSurface* output_surface_;
|
| + WebContents* contents_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorImpl);
|
| };
|
|
|
| } // namespace content
|
|
|
| -#endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_IMPL_H_
|
| +#endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_IMPL_H_
|
|
|