| OLD | NEW |
| 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 Loading... |
| 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/android/motion_event_android.h" |
| 39 #include "ui/events/gesture_detection/filtered_gesture_provider.h" | 40 #include "ui/events/gesture_detection/filtered_gesture_provider.h" |
| 40 #include "ui/gfx/geometry/size.h" | 41 #include "ui/gfx/geometry/size.h" |
| 41 #include "ui/gfx/geometry/vector2d_f.h" | 42 #include "ui/gfx/geometry/vector2d_f.h" |
| 42 #include "ui/gfx/selection_bound.h" | 43 #include "ui/gfx/selection_bound.h" |
| 43 #include "ui/touch_selection/touch_selection_controller.h" | 44 #include "ui/touch_selection/touch_selection_controller.h" |
| 44 | 45 |
| 45 class GURL; | 46 class GURL; |
| 46 | 47 |
| 47 namespace ui { | 48 namespace ui { |
| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 cc::FrameSinkId GetFrameSinkId() override; | 149 cc::FrameSinkId GetFrameSinkId() override; |
| 148 void ShowDisambiguationPopup(const gfx::Rect& rect_pixels, | 150 void ShowDisambiguationPopup(const gfx::Rect& rect_pixels, |
| 149 const SkBitmap& zoomed_bitmap) override; | 151 const SkBitmap& zoomed_bitmap) override; |
| 150 std::unique_ptr<SyntheticGestureTarget> CreateSyntheticGestureTarget() | 152 std::unique_ptr<SyntheticGestureTarget> CreateSyntheticGestureTarget() |
| 151 override; | 153 override; |
| 152 void LockCompositingSurface() override; | 154 void LockCompositingSurface() override; |
| 153 void UnlockCompositingSurface() override; | 155 void UnlockCompositingSurface() override; |
| 154 void OnDidNavigateMainFrameToNewPage() override; | 156 void OnDidNavigateMainFrameToNewPage() override; |
| 155 void SetNeedsBeginFrames(bool needs_begin_frames) override; | 157 void SetNeedsBeginFrames(bool needs_begin_frames) override; |
| 156 | 158 |
| 159 // ui::ViewClient implementation. |
| 160 bool OnTouchEvent(const ui::MotionEventAndroid& event, |
| 161 bool is_touch_handle_event); |
| 162 |
| 157 // ui::GestureProviderClient implementation. | 163 // ui::GestureProviderClient implementation. |
| 158 void OnGestureEvent(const ui::GestureEventData& gesture) override; | 164 void OnGestureEvent(const ui::GestureEventData& gesture) override; |
| 159 | 165 |
| 160 // ui::WindowAndroidObserver implementation. | 166 // ui::WindowAndroidObserver implementation. |
| 161 void OnCompositingDidCommit() override; | 167 void OnCompositingDidCommit() override; |
| 162 void OnRootWindowVisibilityChanged(bool visible) override; | 168 void OnRootWindowVisibilityChanged(bool visible) override; |
| 163 void OnAttachCompositor() override; | 169 void OnAttachCompositor() override; |
| 164 void OnDetachCompositor() override; | 170 void OnDetachCompositor() override; |
| 165 void OnAnimate(base::TimeTicks begin_frame_time) override; | 171 void OnAnimate(base::TimeTicks begin_frame_time) override; |
| 166 void OnActivityStopped() override; | 172 void OnActivityStopped() override; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 void SendKeyEvent(const NativeWebKeyboardEvent& event); | 211 void SendKeyEvent(const NativeWebKeyboardEvent& event); |
| 206 void SendMouseEvent(const ui::MotionEventAndroid&, int changed_button); | 212 void SendMouseEvent(const ui::MotionEventAndroid&, int changed_button); |
| 207 void SendMouseWheelEvent(const blink::WebMouseWheelEvent& event); | 213 void SendMouseWheelEvent(const blink::WebMouseWheelEvent& event); |
| 208 void SendGestureEvent(const blink::WebGestureEvent& event); | 214 void SendGestureEvent(const blink::WebGestureEvent& event); |
| 209 | 215 |
| 210 void OnStartContentIntent(const GURL& content_url, bool is_main_frame); | 216 void OnStartContentIntent(const GURL& content_url, bool is_main_frame); |
| 211 void OnSmartClipDataExtracted(const base::string16& text, | 217 void OnSmartClipDataExtracted(const base::string16& text, |
| 212 const base::string16& html, | 218 const base::string16& html, |
| 213 const gfx::Rect rect); | 219 const gfx::Rect rect); |
| 214 | 220 |
| 215 bool OnTouchEvent(const ui::MotionEvent& event); | 221 bool ProcessTouchEvent(const ui::MotionEvent& event); |
| 216 bool OnTouchHandleEvent(const ui::MotionEvent& event); | 222 bool ProcessTouchHandleEvent(const ui::MotionEvent& event); |
| 217 void ResetGestureDetection(); | 223 void ResetGestureDetection(); |
| 218 void SetDoubleTapSupportEnabled(bool enabled); | 224 void SetDoubleTapSupportEnabled(bool enabled); |
| 219 void SetMultiTouchZoomSupportEnabled(bool enabled); | 225 void SetMultiTouchZoomSupportEnabled(bool enabled); |
| 220 | 226 |
| 221 long GetNativeImeAdapter(); | 227 long GetNativeImeAdapter(); |
| 222 | 228 |
| 223 void WasResized(); | 229 void WasResized(); |
| 224 | 230 |
| 225 void GetScaledContentBitmap(float scale, | 231 void GetScaledContentBitmap(float scale, |
| 226 SkColorType preferred_color_type, | 232 SkColorType preferred_color_type, |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 gfx::Vector2dF last_scroll_offset_; | 402 gfx::Vector2dF last_scroll_offset_; |
| 397 | 403 |
| 398 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; | 404 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; |
| 399 | 405 |
| 400 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); | 406 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); |
| 401 }; | 407 }; |
| 402 | 408 |
| 403 } // namespace content | 409 } // namespace content |
| 404 | 410 |
| 405 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ | 411 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ |
| OLD | NEW |