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

Unified Diff: content/renderer/render_frame_impl.h

Issue 2903833002: Reland: Update TextSelection for non-user initiated events
Patch Set: Add test for JS cursor movement Created 3 years, 5 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
« no previous file with comments | « content/renderer/pepper/pepper_plugin_instance_impl.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.h
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 351489a51a9fc886da0ac111063991e764b54451..c0260197cfaae8cd39b952d86f200150a24b1b7e 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -324,6 +324,12 @@ class CONTENT_EXPORT RenderFrameImpl
// Called when the widget receives a mouse event.
void RenderWidgetWillHandleMouseEvent();
+ // Notifies the browser of text selection changes made.
+ void SetSelectedText(const base::string16& selection_text,
+ size_t offset,
+ const gfx::Range& range,
+ bool user_initiated);
+
#if BUILDFLAG(ENABLE_PLUGINS)
// Get/set the plugin which will be used to handle document find requests.
void set_plugin_find_handler(PepperPluginInstanceImpl* plugin) {
@@ -449,9 +455,6 @@ class CONTENT_EXPORT RenderFrameImpl
bool IsFTPDirectoryListing() override;
void AttachGuest(int element_instance_id) override;
void DetachGuest(int element_instance_id) override;
- void SetSelectedText(const base::string16& selection_text,
- size_t offset,
- const gfx::Range& range) override;
void EnsureMojoBuiltinsAreAvailable(v8::Isolate* isolate,
v8::Local<v8::Context> context) override;
void AddMessageToConsole(ConsoleMessageLevel level,
@@ -764,7 +767,7 @@ class CONTENT_EXPORT RenderFrameImpl
// it has changed.
// TODO(varunjain): delete this method once we figure out how to keep
// selection handles in sync with the webpage.
- void SyncSelectionIfRequired();
+ void SyncSelectionIfRequired(bool user_initiated);
protected:
explicit RenderFrameImpl(const CreateParams& params);
« no previous file with comments | « content/renderer/pepper/pepper_plugin_instance_impl.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698