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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.h

Issue 2708613002: Add EventForwarder for routing touch events (Closed)
Patch Set: unittests Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 16 matching lines...) Expand all
27 #include "content/browser/renderer_host/ime_adapter_android.h" 27 #include "content/browser/renderer_host/ime_adapter_android.h"
28 #include "content/browser/renderer_host/input/stylus_text_selector.h" 28 #include "content/browser/renderer_host/input/stylus_text_selector.h"
29 #include "content/browser/renderer_host/render_widget_host_view_base.h" 29 #include "content/browser/renderer_host/render_widget_host_view_base.h"
30 #include "content/browser/renderer_host/text_input_manager.h" 30 #include "content/browser/renderer_host/text_input_manager.h"
31 #include "content/common/content_export.h" 31 #include "content/common/content_export.h"
32 #include "content/public/browser/readback_types.h" 32 #include "content/public/browser/readback_types.h"
33 #include "gpu/command_buffer/common/mailbox.h" 33 #include "gpu/command_buffer/common/mailbox.h"
34 #include "third_party/skia/include/core/SkColor.h" 34 #include "third_party/skia/include/core/SkColor.h"
35 #include "ui/android/delegated_frame_host_android.h" 35 #include "ui/android/delegated_frame_host_android.h"
36 #include "ui/android/view_android.h" 36 #include "ui/android/view_android.h"
37 #include "ui/android/view_client.h"
37 #include "ui/android/window_android_observer.h" 38 #include "ui/android/window_android_observer.h"
38 #include "ui/events/android/motion_event_android.h"
39 #include "ui/events/gesture_detection/filtered_gesture_provider.h" 39 #include "ui/events/gesture_detection/filtered_gesture_provider.h"
40 #include "ui/gfx/geometry/size.h" 40 #include "ui/gfx/geometry/size.h"
41 #include "ui/gfx/geometry/vector2d_f.h" 41 #include "ui/gfx/geometry/vector2d_f.h"
42 #include "ui/gfx/selection_bound.h" 42 #include "ui/gfx/selection_bound.h"
43 #include "ui/touch_selection/touch_selection_controller.h" 43 #include "ui/touch_selection/touch_selection_controller.h"
44 44
45 class GURL; 45 class GURL;
46 46
47 namespace ui { 47 namespace ui {
48 class MotionEventAndroid;
48 struct DidOverscrollParams; 49 struct DidOverscrollParams;
49 } 50 }
50 51
51 namespace content { 52 namespace content {
52 class ContentViewCoreImpl; 53 class ContentViewCoreImpl;
53 class OverscrollControllerAndroid; 54 class OverscrollControllerAndroid;
54 class RenderWidgetHost; 55 class RenderWidgetHost;
55 class RenderWidgetHostImpl; 56 class RenderWidgetHostImpl;
56 class SynchronousCompositorHost; 57 class SynchronousCompositorHost;
57 class SynchronousCompositorClient; 58 class SynchronousCompositorClient;
58 struct NativeWebKeyboardEvent; 59 struct NativeWebKeyboardEvent;
59 60
60 // ----------------------------------------------------------------------------- 61 // -----------------------------------------------------------------------------
61 // See comments in render_widget_host_view.h about this class and its members. 62 // See comments in render_widget_host_view.h about this class and its members.
62 // ----------------------------------------------------------------------------- 63 // -----------------------------------------------------------------------------
63 class CONTENT_EXPORT RenderWidgetHostViewAndroid 64 class CONTENT_EXPORT RenderWidgetHostViewAndroid
64 : public RenderWidgetHostViewBase, 65 : public RenderWidgetHostViewBase,
65 public ui::GestureProviderClient, 66 public ui::GestureProviderClient,
67 public ui::ViewClient,
66 public ui::WindowAndroidObserver, 68 public ui::WindowAndroidObserver,
67 public DelegatedFrameEvictorClient, 69 public DelegatedFrameEvictorClient,
68 public StylusTextSelectorClient, 70 public StylusTextSelectorClient,
69 public ui::TouchSelectionControllerClient, 71 public ui::TouchSelectionControllerClient,
70 public content::ContentViewCoreImplObserver, 72 public content::ContentViewCoreImplObserver,
71 public content::TextInputManager::Observer, 73 public content::TextInputManager::Observer,
72 public ui::DelegatedFrameHostAndroid::Client, 74 public ui::DelegatedFrameHostAndroid::Client,
73 public cc::BeginFrameObserver { 75 public cc::BeginFrameObserver {
74 public: 76 public:
75 RenderWidgetHostViewAndroid(RenderWidgetHostImpl* widget, 77 RenderWidgetHostViewAndroid(RenderWidgetHostImpl* widget,
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 void DidOverscroll(const ui::DidOverscrollParams& params) override; 144 void DidOverscroll(const ui::DidOverscrollParams& params) override;
143 void DidStopFlinging() override; 145 void DidStopFlinging() override;
144 cc::FrameSinkId GetFrameSinkId() override; 146 cc::FrameSinkId GetFrameSinkId() override;
145 void ShowDisambiguationPopup(const gfx::Rect& rect_pixels, 147 void ShowDisambiguationPopup(const gfx::Rect& rect_pixels,
146 const SkBitmap& zoomed_bitmap) override; 148 const SkBitmap& zoomed_bitmap) override;
147 std::unique_ptr<SyntheticGestureTarget> CreateSyntheticGestureTarget() 149 std::unique_ptr<SyntheticGestureTarget> CreateSyntheticGestureTarget()
148 override; 150 override;
149 void OnDidNavigateMainFrameToNewPage() override; 151 void OnDidNavigateMainFrameToNewPage() override;
150 void SetNeedsBeginFrames(bool needs_begin_frames) override; 152 void SetNeedsBeginFrames(bool needs_begin_frames) override;
151 153
154 // ui::ViewClient implementation.
155 bool OnTouchEvent(const ui::MotionEventData& m) override;
156 bool OnMouseEvent(const ui::MotionEventData& m) override;
157
152 // ui::GestureProviderClient implementation. 158 // ui::GestureProviderClient implementation.
153 void OnGestureEvent(const ui::GestureEventData& gesture) override; 159 void OnGestureEvent(const ui::GestureEventData& gesture) override;
154 160
155 // ui::WindowAndroidObserver implementation. 161 // ui::WindowAndroidObserver implementation.
156 void OnCompositingDidCommit() override {} 162 void OnCompositingDidCommit() override {}
157 void OnRootWindowVisibilityChanged(bool visible) override; 163 void OnRootWindowVisibilityChanged(bool visible) override;
158 void OnAttachCompositor() override; 164 void OnAttachCompositor() override;
159 void OnDetachCompositor() override; 165 void OnDetachCompositor() override;
160 void OnAnimate(base::TimeTicks begin_frame_time) override; 166 void OnAnimate(base::TimeTicks begin_frame_time) override;
161 void OnActivityStopped() override; 167 void OnActivityStopped() override;
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 float prev_bottom_shown_pix_; 388 float prev_bottom_shown_pix_;
383 389
384 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; 390 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_;
385 391
386 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); 392 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid);
387 }; 393 };
388 394
389 } // namespace content 395 } // namespace content
390 396
391 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 397 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698