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

Unified Diff: content/renderer/render_frame_impl.h

Issue 2856093003: Update TextSelection for non-user initiated events (Closed)
Patch Set: Update TextSelection for non-user initiated events Created 3 years, 7 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 e55f0c09f2b4076ed360247e18d9a68f53d49db8..74330606de44269cc0ed18de1bd0b958f1a3fb00 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -342,6 +342,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) {
@@ -466,9 +472,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,
@@ -1016,7 +1019,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);
bool RunJavaScriptDialog(JavaScriptDialogType type,
const base::string16& message,
« 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