Index: content/browser/frame_host/render_widget_host_view_child_frame.h |
diff --git a/content/browser/frame_host/render_widget_host_view_child_frame.h b/content/browser/frame_host/render_widget_host_view_child_frame.h |
index 844d36241994b1218c6f44aebdece7ca86526b29..70a3b2fcd0ac361252a07264d5feaa5fbbb4cbbd 100644 |
--- a/content/browser/frame_host/render_widget_host_view_child_frame.h |
+++ b/content/browser/frame_host/render_widget_host_view_child_frame.h |
@@ -23,6 +23,7 @@ |
#include "cc/surfaces/surface_sequence.h" |
#include "content/browser/compositor/image_transport_factory.h" |
#include "content/browser/renderer_host/event_with_latency_info.h" |
+#include "content/browser/renderer_host/input/touch_selection_controller_client_manager.h" |
#include "content/browser/renderer_host/render_widget_host_view_base.h" |
#include "content/common/content_export.h" |
#include "content/common/input/input_event_ack_state.h" |
@@ -40,6 +41,7 @@ class RenderWidgetHost; |
class RenderWidgetHostImpl; |
class RenderWidgetHostViewChildFrameTest; |
class RenderWidgetHostViewGuestSurfaceTest; |
+class TouchSelectionControllerClientChildFrame; |
// RenderWidgetHostViewChildFrame implements the view for a RenderWidgetHost |
// associated with content being rendered in a separate process from |
@@ -51,6 +53,7 @@ class RenderWidgetHostViewGuestSurfaceTest; |
// See comments in render_widget_host_view.h about this class and its members. |
class CONTENT_EXPORT RenderWidgetHostViewChildFrame |
: public RenderWidgetHostViewBase, |
+ public TouchSelectionControllerClientManager::Observer, |
public NON_EXPORTED_BASE(cc::CompositorFrameSinkSupportClient) { |
public: |
static RenderWidgetHostViewChildFrame* Create(RenderWidgetHost* widget); |
@@ -68,6 +71,10 @@ class CONTENT_EXPORT RenderWidgetHostViewChildFrame |
// types, such as RenderWidgetHostViewAura. |
void RegisterFrameSwappedCallback(std::unique_ptr<base::Closure> callback); |
+ // TouchSelectionControllerClientManager::Observer implementation. |
+ void OnManagerWillDestroy( |
+ TouchSelectionControllerClientManager* manager) override; |
+ |
// RenderWidgetHostView implementation. |
void InitAsChild(gfx::NativeView parent_view) override; |
RenderWidgetHost* GetRenderWidgetHost() const override; |
@@ -191,6 +198,12 @@ class CONTENT_EXPORT RenderWidgetHostViewChildFrame |
bool has_frame() { return has_frame_; } |
+ ui::TextInputType GetTextInputType() const; |
+ bool GetSelectionRange(gfx::Range* range) const; |
+ // This returns the origin of this views's bounding rect in the coordinates |
+ // of the root RenderWidgetHostView. |
+ gfx::Point GetViewOriginInRoot() const; |
+ |
protected: |
friend class RenderWidgetHostView; |
friend class RenderWidgetHostViewChildFrameTest; |
@@ -249,6 +262,7 @@ class CONTENT_EXPORT RenderWidgetHostViewChildFrame |
void CreateCompositorFrameSinkSupport(); |
void ResetCompositorFrameSinkSupport(); |
+ void DetachFromTouchSelectionClientManagerIfNecessary(); |
virtual bool HasEmbedderChanged(); |
@@ -267,6 +281,9 @@ class CONTENT_EXPORT RenderWidgetHostViewChildFrame |
// The background color of the widget. |
SkColor background_color_; |
+ std::unique_ptr<TouchSelectionControllerClientChildFrame> |
+ selection_controller_client_; |
+ |
base::WeakPtrFactory<RenderWidgetHostViewChildFrame> weak_factory_; |
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrame); |
}; |