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

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: rebased 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 struct DidOverscrollParams; 48 struct DidOverscrollParams;
49 } 49 }
50 50
51 namespace content { 51 namespace content {
52 class ContentViewCoreImpl; 52 class ContentViewCoreImpl;
53 class OverscrollControllerAndroid; 53 class OverscrollControllerAndroid;
54 class RenderWidgetHost; 54 class RenderWidgetHost;
55 class RenderWidgetHostImpl; 55 class RenderWidgetHostImpl;
56 class SynchronousCompositorHost; 56 class SynchronousCompositorHost;
57 class SynchronousCompositorClient; 57 class SynchronousCompositorClient;
58 struct NativeWebKeyboardEvent; 58 struct NativeWebKeyboardEvent;
59 59
60 // ----------------------------------------------------------------------------- 60 // -----------------------------------------------------------------------------
61 // See comments in render_widget_host_view.h about this class and its members. 61 // See comments in render_widget_host_view.h about this class and its members.
62 // ----------------------------------------------------------------------------- 62 // -----------------------------------------------------------------------------
63 class CONTENT_EXPORT RenderWidgetHostViewAndroid 63 class CONTENT_EXPORT RenderWidgetHostViewAndroid
64 : public RenderWidgetHostViewBase, 64 : public RenderWidgetHostViewBase,
65 public ui::GestureProviderClient, 65 public ui::GestureProviderClient,
66 public ui::ViewClient,
66 public ui::WindowAndroidObserver, 67 public ui::WindowAndroidObserver,
67 public DelegatedFrameEvictorClient, 68 public DelegatedFrameEvictorClient,
68 public StylusTextSelectorClient, 69 public StylusTextSelectorClient,
69 public ui::TouchSelectionControllerClient, 70 public ui::TouchSelectionControllerClient,
70 public content::ContentViewCoreImplObserver, 71 public content::ContentViewCoreImplObserver,
71 public content::TextInputManager::Observer, 72 public content::TextInputManager::Observer,
72 public ui::DelegatedFrameHostAndroid::Client, 73 public ui::DelegatedFrameHostAndroid::Client,
73 public cc::BeginFrameObserver { 74 public cc::BeginFrameObserver {
74 public: 75 public:
75 RenderWidgetHostViewAndroid(RenderWidgetHostImpl* widget, 76 RenderWidgetHostViewAndroid(RenderWidgetHostImpl* widget,
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 void DidOverscroll(const ui::DidOverscrollParams& params) override; 143 void DidOverscroll(const ui::DidOverscrollParams& params) override;
143 void DidStopFlinging() override; 144 void DidStopFlinging() override;
144 cc::FrameSinkId GetFrameSinkId() override; 145 cc::FrameSinkId GetFrameSinkId() override;
145 void ShowDisambiguationPopup(const gfx::Rect& rect_pixels, 146 void ShowDisambiguationPopup(const gfx::Rect& rect_pixels,
146 const SkBitmap& zoomed_bitmap) override; 147 const SkBitmap& zoomed_bitmap) override;
147 std::unique_ptr<SyntheticGestureTarget> CreateSyntheticGestureTarget() 148 std::unique_ptr<SyntheticGestureTarget> CreateSyntheticGestureTarget()
148 override; 149 override;
149 void OnDidNavigateMainFrameToNewPage() override; 150 void OnDidNavigateMainFrameToNewPage() override;
150 void SetNeedsBeginFrames(bool needs_begin_frames) override; 151 void SetNeedsBeginFrames(bool needs_begin_frames) override;
151 152
153 // ui::ViewClient implementation.
154 bool OnTouchEvent(const ui::MotionEventAndroid& event,
155 bool is_touch_handle_event) override;
156 bool OnMouseEvent(const ui::MotionEventAndroid& event,
157 int changed_button) override;
158
152 // ui::GestureProviderClient implementation. 159 // ui::GestureProviderClient implementation.
153 void OnGestureEvent(const ui::GestureEventData& gesture) override; 160 void OnGestureEvent(const ui::GestureEventData& gesture) override;
154 161
155 // ui::WindowAndroidObserver implementation. 162 // ui::WindowAndroidObserver implementation.
156 void OnCompositingDidCommit() override {} 163 void OnCompositingDidCommit() override {}
157 void OnRootWindowVisibilityChanged(bool visible) override; 164 void OnRootWindowVisibilityChanged(bool visible) override;
158 void OnAttachCompositor() override; 165 void OnAttachCompositor() override;
159 void OnDetachCompositor() override; 166 void OnDetachCompositor() override;
160 void OnAnimate(base::TimeTicks begin_frame_time) override; 167 void OnAnimate(base::TimeTicks begin_frame_time) override;
161 void OnActivityStopped() override; 168 void OnActivityStopped() override;
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 float prev_bottom_shown_pix_; 389 float prev_bottom_shown_pix_;
383 390
384 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; 391 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_;
385 392
386 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); 393 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid);
387 }; 394 };
388 395
389 } // namespace content 396 } // namespace content
390 397
391 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 398 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698