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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 1205033005: Adds selection expansion support for Contextual Search. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Switch from RenderView to RenderFrame Created 5 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
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 3df8edb12fb483d5ba4ad4ef7a8c350a20cee49d..f92713d0e9bde94206547fc146633cf58f8d4e04 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2055,6 +2055,16 @@ void WebContentsImpl::SelectRange(const gfx::Point& base,
new InputMsg_SelectRange(focused_frame->GetRoutingID(), base, extent));
}
+void WebContentsImpl::ExpandSelectionByCharacterOffset(int start_adjust,
+ int end_adjust) {
+ RenderFrameHost* focused_frame = GetFocusedFrame();
Charlie Reis 2015/07/07 17:02:27 Yes, operating on the focused frame sounds right t
+ if (!focused_frame)
+ return;
+
+ focused_frame->Send(new InputMsg_ExpandSelectionByCharacterOffset(
+ focused_frame->GetRoutingID(), start_adjust, end_adjust));
+}
+
void WebContentsImpl::UpdatePreferredSize(const gfx::Size& pref_size) {
const gfx::Size old_size = GetPreferredSize();
preferred_size_ = pref_size;

Powered by Google App Engine
This is Rietveld 408576698