| 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 <map> | 8 #include <map> |
| 9 #include <queue> | 9 #include <queue> |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 25 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 26 #include "content/common/content_export.h" | 26 #include "content/common/content_export.h" |
| 27 #include "content/public/browser/readback_types.h" | 27 #include "content/public/browser/readback_types.h" |
| 28 #include "gpu/command_buffer/common/mailbox.h" | 28 #include "gpu/command_buffer/common/mailbox.h" |
| 29 #include "third_party/skia/include/core/SkColor.h" | 29 #include "third_party/skia/include/core/SkColor.h" |
| 30 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" | 30 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" |
| 31 #include "ui/android/window_android_observer.h" | 31 #include "ui/android/window_android_observer.h" |
| 32 #include "ui/events/gesture_detection/filtered_gesture_provider.h" | 32 #include "ui/events/gesture_detection/filtered_gesture_provider.h" |
| 33 #include "ui/gfx/geometry/size.h" | 33 #include "ui/gfx/geometry/size.h" |
| 34 #include "ui/gfx/geometry/vector2d_f.h" | 34 #include "ui/gfx/geometry/vector2d_f.h" |
| 35 #include "ui/touch_selection/touch_selection_controller.h" | 35 #include "ui/touch_selection/touch_selection_controller_android.h" |
| 36 | 36 |
| 37 struct ViewHostMsg_TextInputState_Params; | 37 struct ViewHostMsg_TextInputState_Params; |
| 38 | 38 |
| 39 namespace cc { | 39 namespace cc { |
| 40 class CopyOutputResult; | 40 class CopyOutputResult; |
| 41 class DelegatedFrameProvider; | 41 class DelegatedFrameProvider; |
| 42 class DelegatedRendererLayer; | 42 class DelegatedRendererLayer; |
| 43 class Layer; | 43 class Layer; |
| 44 class SurfaceFactory; | 44 class SurfaceFactory; |
| 45 class SurfaceIdAllocator; | 45 class SurfaceIdAllocator; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 // See comments in render_widget_host_view.h about this class and its members. | 84 // See comments in render_widget_host_view.h about this class and its members. |
| 85 // ----------------------------------------------------------------------------- | 85 // ----------------------------------------------------------------------------- |
| 86 class CONTENT_EXPORT RenderWidgetHostViewAndroid | 86 class CONTENT_EXPORT RenderWidgetHostViewAndroid |
| 87 : public RenderWidgetHostViewBase, | 87 : public RenderWidgetHostViewBase, |
| 88 public cc::DelegatedFrameResourceCollectionClient, | 88 public cc::DelegatedFrameResourceCollectionClient, |
| 89 public cc::SurfaceFactoryClient, | 89 public cc::SurfaceFactoryClient, |
| 90 public ui::GestureProviderClient, | 90 public ui::GestureProviderClient, |
| 91 public ui::WindowAndroidObserver, | 91 public ui::WindowAndroidObserver, |
| 92 public DelegatedFrameEvictorClient, | 92 public DelegatedFrameEvictorClient, |
| 93 public StylusTextSelectorClient, | 93 public StylusTextSelectorClient, |
| 94 public ui::TouchSelectionControllerClient { | 94 public ui::TouchSelectionControllerAndroidClient { |
| 95 public: | 95 public: |
| 96 RenderWidgetHostViewAndroid(RenderWidgetHostImpl* widget, | 96 RenderWidgetHostViewAndroid(RenderWidgetHostImpl* widget, |
| 97 ContentViewCoreImpl* content_view_core); | 97 ContentViewCoreImpl* content_view_core); |
| 98 ~RenderWidgetHostViewAndroid() override; | 98 ~RenderWidgetHostViewAndroid() override; |
| 99 | 99 |
| 100 // RenderWidgetHostView implementation. | 100 // RenderWidgetHostView implementation. |
| 101 bool OnMessageReceived(const IPC::Message& msg) override; | 101 bool OnMessageReceived(const IPC::Message& msg) override; |
| 102 void InitAsChild(gfx::NativeView parent_view) override; | 102 void InitAsChild(gfx::NativeView parent_view) override; |
| 103 void InitAsPopup(RenderWidgetHostView* parent_host_view, | 103 void InitAsPopup(RenderWidgetHostView* parent_host_view, |
| 104 const gfx::Rect& pos) override; | 104 const gfx::Rect& pos) override; |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 void EvictDelegatedFrame() override; | 203 void EvictDelegatedFrame() override; |
| 204 | 204 |
| 205 SkColorType PreferredReadbackFormat() override; | 205 SkColorType PreferredReadbackFormat() override; |
| 206 | 206 |
| 207 // StylusTextSelectorClient implementation. | 207 // StylusTextSelectorClient implementation. |
| 208 void OnStylusSelectBegin(float x0, float y0, float x1, float y1) override; | 208 void OnStylusSelectBegin(float x0, float y0, float x1, float y1) override; |
| 209 void OnStylusSelectUpdate(float x, float y) override; | 209 void OnStylusSelectUpdate(float x, float y) override; |
| 210 void OnStylusSelectEnd() override; | 210 void OnStylusSelectEnd() override; |
| 211 void OnStylusSelectTap(base::TimeTicks time, float x, float y) override; | 211 void OnStylusSelectTap(base::TimeTicks time, float x, float y) override; |
| 212 | 212 |
| 213 // ui::TouchSelectionControllerClient implementation. | 213 // ui::TouchSelectionControllerAndroidClient implementation. |
| 214 bool SupportsAnimation() const override; | 214 bool SupportsAnimation() const override; |
| 215 void SetNeedsAnimate() override; | 215 void SetNeedsAnimate() override; |
| 216 void MoveCaret(const gfx::PointF& position) override; | 216 void MoveCaret(const gfx::PointF& position) override; |
| 217 void MoveRangeSelectionExtent(const gfx::PointF& extent) override; | 217 void MoveRangeSelectionExtent(const gfx::PointF& extent) override; |
| 218 void SelectBetweenCoordinates(const gfx::PointF& base, | 218 void SelectBetweenCoordinates(const gfx::PointF& base, |
| 219 const gfx::PointF& extent) override; | 219 const gfx::PointF& extent) override; |
| 220 void OnSelectionEvent(ui::SelectionEventType event, | 220 void OnSelectionEvent(ui::SelectionEventType event, |
| 221 const gfx::PointF& anchor_position) override; | 221 const gfx::PointF& anchor_position) override; |
| 222 scoped_ptr<ui::TouchHandleDrawable> CreateDrawable() override; | 222 scoped_ptr<ui::TouchHandleDrawable> CreateDrawable() override; |
| 223 | 223 |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 | 388 |
| 389 // Provides gesture synthesis given a stream of touch events (derived from | 389 // Provides gesture synthesis given a stream of touch events (derived from |
| 390 // Android MotionEvent's) and touch event acks. | 390 // Android MotionEvent's) and touch event acks. |
| 391 ui::FilteredGestureProvider gesture_provider_; | 391 ui::FilteredGestureProvider gesture_provider_; |
| 392 | 392 |
| 393 // Handles gesture based text selection | 393 // Handles gesture based text selection |
| 394 StylusTextSelector stylus_text_selector_; | 394 StylusTextSelector stylus_text_selector_; |
| 395 | 395 |
| 396 // Manages selection handle rendering and manipulation. | 396 // Manages selection handle rendering and manipulation. |
| 397 // This will always be NULL if |content_view_core_| is NULL. | 397 // This will always be NULL if |content_view_core_| is NULL. |
| 398 scoped_ptr<ui::TouchSelectionController> selection_controller_; | 398 scoped_ptr<ui::TouchSelectionControllerAndroid> selection_controller_; |
| 399 | 399 |
| 400 int accelerated_surface_route_id_; | 400 int accelerated_surface_route_id_; |
| 401 | 401 |
| 402 // Size to use if we have no backing ContentViewCore | 402 // Size to use if we have no backing ContentViewCore |
| 403 gfx::Size default_size_; | 403 gfx::Size default_size_; |
| 404 | 404 |
| 405 const bool using_browser_compositor_; | 405 const bool using_browser_compositor_; |
| 406 | 406 |
| 407 scoped_ptr<DelegatedFrameEvictor> frame_evictor_; | 407 scoped_ptr<DelegatedFrameEvictor> frame_evictor_; |
| 408 | 408 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 428 gfx::Vector2dF last_scroll_offset_; | 428 gfx::Vector2dF last_scroll_offset_; |
| 429 | 429 |
| 430 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; | 430 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; |
| 431 | 431 |
| 432 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); | 432 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); |
| 433 }; | 433 }; |
| 434 | 434 |
| 435 } // namespace content | 435 } // namespace content |
| 436 | 436 |
| 437 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ | 437 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ |
| OLD | NEW |