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

Unified Diff: content/browser/android/in_process/synchronous_compositor_impl.h

Issue 15851006: Move synchronous compositor into content/browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
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 56%
rename from content/renderer/android/synchronous_compositor_impl.h
rename to content/browser/android/in_process/synchronous_compositor_impl.h
index 35317b7ee3b4932dad689ef38e42b4e9be04d4ab..3659ca01d28148cbd7a0e190beac55ab88441362 100644
--- a/content/renderer/android/synchronous_compositor_impl.h
+++ b/content/browser/android/in_process/synchronous_compositor_impl.h
@@ -2,19 +2,15 @@
// 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/public/renderer/android/synchronous_compositor.h"
-#include "content/renderer/android/synchronous_compositor_output_surface.h"
-
-namespace cc {
-class OutputSurface;
-}
+#include "content/browser/android/in_process/synchronous_compositor_output_surface.h"
+#include "content/public/browser/android/synchronous_compositor.h"
+#include "content/public/browser/web_contents_user_data.h"
namespace content {
@@ -25,12 +21,10 @@ 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();
-
- scoped_ptr<cc::OutputSurface> CreateOutputSurface();
+ static SynchronousCompositorImpl* FromRoutingID(int routing_id);
// SynchronousCompositor
virtual bool IsHwReady() OVERRIDE;
@@ -43,20 +37,29 @@ class SynchronousCompositorImpl
gfx::Rect clip) OVERRIDE;
// SynchronousCompositorOutputSurfaceDelegate
+ virtual void DidBindOutputSurface(
+ SynchronousCompositorOutputSurface* output_surface) OVERRIDE;
+ virtual void DidDestroySynchronousOutputSurface(
+ SynchronousCompositorOutputSurface* output_surface) OVERRIDE;
virtual void SetContinuousInvalidate(bool enable) OVERRIDE;
- virtual void DidCreateSynchronousOutputSurface() OVERRIDE;
- virtual void DidDestroySynchronousOutputSurface() OVERRIDE;
private:
+ explicit SynchronousCompositorImpl(WebContents* contents);
+ virtual ~SynchronousCompositorImpl();
+ friend class WebContentsUserData<SynchronousCompositorImpl>;
+
+ 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_
« no previous file with comments | « content/browser/android/in_process/DEPS ('k') | content/browser/android/in_process/synchronous_compositor_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698