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

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

Issue 15002007: Delegate root layer scroll offset to android_webview. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase on top of Jared's CL Created 7 years, 6 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/browser/android/in_process/synchronous_compositor_impl.h b/content/browser/android/in_process/synchronous_compositor_impl.h
index 55184ceac54550555d8f833ec3ba2669d68a46f3..18a647e6af032cf16b6b16980788ba36487a23dc 100644
--- a/content/browser/android/in_process/synchronous_compositor_impl.h
+++ b/content/browser/android/in_process/synchronous_compositor_impl.h
@@ -8,16 +8,23 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
+#include "cc/input/layer_scroll_offset_delegate.h"
#include "content/browser/android/in_process/synchronous_compositor_output_surface.h"
#include "content/port/common/input_event_ack_state.h"
#include "content/public/browser/android/synchronous_compositor.h"
#include "content/public/browser/web_contents_user_data.h"
+namespace cc {
+class InputHandler;
+}
+
namespace WebKit {
class WebInputEvent;
}
namespace content {
+class InputHandlerManager;
// The purpose of this class is to act as the intermediary between the various
// components that make up the 'synchronous compositor mode' implementation and
@@ -25,7 +32,8 @@ namespace content {
// This class is created on the main thread but most of the APIs are called
// from the Compositor thread.
class SynchronousCompositorImpl
- : public SynchronousCompositor,
+ : public cc::LayerScrollOffsetDelegate,
+ public SynchronousCompositor,
public SynchronousCompositorOutputSurfaceDelegate,
public WebContentsUserData<SynchronousCompositorImpl> {
public:
@@ -42,6 +50,7 @@ class SynchronousCompositorImpl
gfx::Size view_size,
const gfx::Transform& transform,
gfx::Rect clip) OVERRIDE;
+ virtual void DidChangeRootLayerScrollOffset() OVERRIDE;
// SynchronousCompositorOutputSurfaceDelegate
virtual void DidBindOutputSurface(
@@ -50,6 +59,12 @@ class SynchronousCompositorImpl
SynchronousCompositorOutputSurface* output_surface) OVERRIDE;
virtual void SetContinuousInvalidate(bool enable) OVERRIDE;
+ // LayerScrollOffsetDelegate
+ virtual void SetTotalScrollOffset(gfx::Vector2dF new_value) OVERRIDE;
+ virtual gfx::Vector2dF GetTotalScrollOffset() OVERRIDE;
+
+ void SetInputHandler(base::WeakPtr<cc::InputHandler> input_handler);
+
private:
explicit SynchronousCompositorImpl(WebContents* contents);
virtual ~SynchronousCompositorImpl();
@@ -63,6 +78,7 @@ class SynchronousCompositorImpl
SynchronousCompositorClient* compositor_client_;
SynchronousCompositorOutputSurface* output_surface_;
WebContents* contents_;
+ base::WeakPtr<cc::InputHandler> input_handler_;
DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorImpl);
};

Powered by Google App Engine
This is Rietveld 408576698