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

Unified Diff: content/browser/renderer_host/render_widget_host_view_android.h

Issue 342633003: [Android] Select text when stylus first button is pressed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed signed unsigned comparison error Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_view_android.h
diff --git a/content/browser/renderer_host/render_widget_host_view_android.h b/content/browser/renderer_host/render_widget_host_view_android.h
index 256fb132efcfca6c06b36da43d11a5757de786bf..fa349d86164acc20b80eda5024458fb2034f1267 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.h
+++ b/content/browser/renderer_host/render_widget_host_view_android.h
@@ -20,6 +20,7 @@
#include "content/browser/renderer_host/delegated_frame_evictor.h"
#include "content/browser/renderer_host/image_transport_factory_android.h"
#include "content/browser/renderer_host/ime_adapter_android.h"
+#include "content/browser/renderer_host/input/gesture_text_selector.h"
#include "content/browser/renderer_host/render_widget_host_view_base.h"
#include "content/common/content_export.h"
#include "gpu/command_buffer/common/mailbox.h"
@@ -65,7 +66,8 @@ class CONTENT_EXPORT RenderWidgetHostViewAndroid
public ImageTransportFactoryAndroidObserver,
public ui::GestureProviderClient,
public ui::WindowAndroidObserver,
- public DelegatedFrameEvictorClient {
+ public DelegatedFrameEvictorClient,
+ public GestureTextSelectorClient {
public:
RenderWidgetHostViewAndroid(RenderWidgetHostImpl* widget,
ContentViewCoreImpl* content_view_core);
@@ -186,6 +188,11 @@ class CONTENT_EXPORT RenderWidgetHostViewAndroid
virtual SkBitmap::Config PreferredReadbackFormat() OVERRIDE;
+ // GestureTextSelectorClient implementation.
+ virtual void ShowSelectionHandlesAutomatically() OVERRIDE;
+ virtual void SelectRange(float x1, float y1, float x2, float y2) OVERRIDE;
+ virtual void Unselect() OVERRIDE;
+
// Non-virtual methods
void SetContentViewCore(ContentViewCoreImpl* content_view_core);
SkColor GetCachedBackgroundColor() const;
@@ -335,6 +342,9 @@ class CONTENT_EXPORT RenderWidgetHostViewAndroid
// Android MotionEvent's) and touch event acks.
ui::FilteredGestureProvider gesture_provider_;
+ // Handles gesture based text selection
+ GestureTextSelector gesture_text_selector_;
+
bool flush_input_requested_;
int accelerated_surface_route_id_;

Powered by Google App Engine
This is Rietveld 408576698