| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 class MotionEventAndroid; | 45 class MotionEventAndroid; |
| 46 struct DidOverscrollParams; | 46 struct DidOverscrollParams; |
| 47 } | 47 } |
| 48 | 48 |
| 49 namespace content { | 49 namespace content { |
| 50 class ContentViewCoreImpl; | 50 class ContentViewCoreImpl; |
| 51 class ImeAdapterAndroid; | 51 class ImeAdapterAndroid; |
| 52 class OverscrollControllerAndroid; | 52 class OverscrollControllerAndroid; |
| 53 class RenderWidgetHost; | 53 class RenderWidgetHost; |
| 54 class RenderWidgetHostImpl; | 54 class RenderWidgetHostImpl; |
| 55 class SelectionPopupController; |
| 55 class SynchronousCompositorHost; | 56 class SynchronousCompositorHost; |
| 56 class SynchronousCompositorClient; | 57 class SynchronousCompositorClient; |
| 57 struct NativeWebKeyboardEvent; | 58 struct NativeWebKeyboardEvent; |
| 58 | 59 |
| 59 // ----------------------------------------------------------------------------- | 60 // ----------------------------------------------------------------------------- |
| 60 // 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. |
| 61 // ----------------------------------------------------------------------------- | 62 // ----------------------------------------------------------------------------- |
| 62 class CONTENT_EXPORT RenderWidgetHostViewAndroid | 63 class CONTENT_EXPORT RenderWidgetHostViewAndroid |
| 63 : public RenderWidgetHostViewBase, | 64 : public RenderWidgetHostViewBase, |
| 64 public ui::GestureProviderClient, | 65 public ui::GestureProviderClient, |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 void SendMouseEvent(const ui::MotionEventAndroid&, int action_button); | 223 void SendMouseEvent(const ui::MotionEventAndroid&, int action_button); |
| 223 void SendMouseWheelEvent(const blink::WebMouseWheelEvent& event); | 224 void SendMouseWheelEvent(const blink::WebMouseWheelEvent& event); |
| 224 void SendGestureEvent(const blink::WebGestureEvent& event); | 225 void SendGestureEvent(const blink::WebGestureEvent& event); |
| 225 void ResolveTapDisambiguation(double timestamp_seconds, | 226 void ResolveTapDisambiguation(double timestamp_seconds, |
| 226 gfx::Point tap_viewport_offset, | 227 gfx::Point tap_viewport_offset, |
| 227 bool is_long_press); | 228 bool is_long_press); |
| 228 void set_ime_adapter(ImeAdapterAndroid* ime_adapter) { | 229 void set_ime_adapter(ImeAdapterAndroid* ime_adapter) { |
| 229 ime_adapter_android_ = ime_adapter; | 230 ime_adapter_android_ = ime_adapter; |
| 230 } | 231 } |
| 231 | 232 |
| 233 void set_selection_popup_controller(SelectionPopupController* controller) { |
| 234 selection_popup_controller_ = controller; |
| 235 } |
| 236 |
| 232 base::WeakPtr<RenderWidgetHostViewAndroid> GetWeakPtrAndroid(); | 237 base::WeakPtr<RenderWidgetHostViewAndroid> GetWeakPtrAndroid(); |
| 233 | 238 |
| 234 bool OnTouchEvent(const ui::MotionEvent& event); | 239 bool OnTouchEvent(const ui::MotionEvent& event); |
| 235 bool OnTouchHandleEvent(const ui::MotionEvent& event); | 240 bool OnTouchHandleEvent(const ui::MotionEvent& event); |
| 236 void ResetGestureDetection(); | 241 void ResetGestureDetection(); |
| 237 void SetDoubleTapSupportEnabled(bool enabled); | 242 void SetDoubleTapSupportEnabled(bool enabled); |
| 238 void SetMultiTouchZoomSupportEnabled(bool enabled); | 243 void SetMultiTouchZoomSupportEnabled(bool enabled); |
| 239 | 244 |
| 240 void WasResized(); | 245 void WasResized(); |
| 241 | 246 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 bool is_in_vr_; | 349 bool is_in_vr_; |
| 345 | 350 |
| 346 // ContentViewCoreImpl is our interface to the view system. | 351 // ContentViewCoreImpl is our interface to the view system. |
| 347 ContentViewCoreImpl* content_view_core_; | 352 ContentViewCoreImpl* content_view_core_; |
| 348 | 353 |
| 349 ImeAdapterAndroid* ime_adapter_android_; | 354 ImeAdapterAndroid* ime_adapter_android_; |
| 350 | 355 |
| 351 // Body background color of the underlying document. | 356 // Body background color of the underlying document. |
| 352 SkColor cached_background_color_; | 357 SkColor cached_background_color_; |
| 353 | 358 |
| 359 SelectionPopupController* selection_popup_controller_; |
| 360 |
| 354 mutable ui::ViewAndroid view_; | 361 mutable ui::ViewAndroid view_; |
| 355 | 362 |
| 356 // Manages the Compositor Frames received from the renderer. | 363 // Manages the Compositor Frames received from the renderer. |
| 357 std::unique_ptr<ui::DelegatedFrameHostAndroid> delegated_frame_host_; | 364 std::unique_ptr<ui::DelegatedFrameHostAndroid> delegated_frame_host_; |
| 358 | 365 |
| 359 cc::ReturnedResourceArray surface_returned_resources_; | 366 cc::ReturnedResourceArray surface_returned_resources_; |
| 360 | 367 |
| 361 // The most recent surface size that was pushed to the surface layer. | 368 // The most recent surface size that was pushed to the surface layer. |
| 362 gfx::Size current_surface_size_; | 369 gfx::Size current_surface_size_; |
| 363 | 370 |
| 364 std::queue<base::Closure> ack_callbacks_; | 371 std::queue<base::Closure> ack_callbacks_; |
| 365 | 372 |
| 366 // Used to control and render overscroll-related effects. | 373 // Used to control and render overscroll-related effects. |
| 367 std::unique_ptr<OverscrollControllerAndroid> overscroll_controller_; | 374 std::unique_ptr<OverscrollControllerAndroid> overscroll_controller_; |
| 368 | 375 |
| 369 // Provides gesture synthesis given a stream of touch events (derived from | 376 // Provides gesture synthesis given a stream of touch events (derived from |
| 370 // Android MotionEvent's) and touch event acks. | 377 // Android MotionEvent's) and touch event acks. |
| 371 ui::FilteredGestureProvider gesture_provider_; | 378 ui::FilteredGestureProvider gesture_provider_; |
| 372 | 379 |
| 373 // Handles gesture based text selection | 380 // Handles gesture based text selection |
| 374 StylusTextSelector stylus_text_selector_; | 381 StylusTextSelector stylus_text_selector_; |
| 375 | 382 |
| 376 // Manages selection handle rendering and manipulation. | 383 // Manages selection handle rendering and manipulation. |
| 377 // This will always be NULL if |content_view_core_| is NULL. | 384 // This will always be NULL if |content_view_core_| is NULL. |
| 378 std::unique_ptr<ui::TouchSelectionController> selection_controller_; | 385 std::unique_ptr<ui::TouchSelectionController> touch_selection_controller_; |
| 379 | 386 |
| 380 // Bounds to use if we have no backing ContentViewCore | 387 // Bounds to use if we have no backing ContentViewCore |
| 381 gfx::Rect default_bounds_; | 388 gfx::Rect default_bounds_; |
| 382 | 389 |
| 383 const bool using_browser_compositor_; | 390 const bool using_browser_compositor_; |
| 384 std::unique_ptr<SynchronousCompositorHost> sync_compositor_; | 391 std::unique_ptr<SynchronousCompositorHost> sync_compositor_; |
| 385 | 392 |
| 386 SynchronousCompositorClient* synchronous_compositor_client_; | 393 SynchronousCompositorClient* synchronous_compositor_client_; |
| 387 | 394 |
| 388 std::unique_ptr<DelegatedFrameEvictor> frame_evictor_; | 395 std::unique_ptr<DelegatedFrameEvictor> frame_evictor_; |
| 389 | 396 |
| 390 bool observing_root_window_; | 397 bool observing_root_window_; |
| 391 | 398 |
| 392 // The last scroll offset of the view. | 399 // The last scroll offset of the view. |
| 393 gfx::Vector2dF last_scroll_offset_; | 400 gfx::Vector2dF last_scroll_offset_; |
| 394 | 401 |
| 395 float prev_top_shown_pix_; | 402 float prev_top_shown_pix_; |
| 396 float prev_bottom_shown_pix_; | 403 float prev_bottom_shown_pix_; |
| 397 | 404 |
| 398 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; | 405 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; |
| 399 | 406 |
| 400 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); | 407 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); |
| 401 }; | 408 }; |
| 402 | 409 |
| 403 } // namespace content | 410 } // namespace content |
| 404 | 411 |
| 405 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ | 412 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ |
| OLD | NEW |