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

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

Issue 1162373002: Make some editing/selection functions accessible to c/b/renderer_host/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplified wait implementations Created 5 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/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 2d64c53effb2e9f8cd85f91970735b15a0040896..7635e7c52f492f9974a1ea84cb68510cafc42d7f 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1962,6 +1962,25 @@ BrowserAccessibilityManager*
return rfh ? rfh->GetOrCreateBrowserAccessibilityManager() : nullptr;
}
+void WebContentsImpl::MoveRangeSelectionExtent(const gfx::Point& extent) {
+ RenderFrameHost* focused_frame = GetFocusedFrame();
+ if (!focused_frame)
+ return;
+
+ focused_frame->Send(new InputMsg_MoveRangeSelectionExtent(
+ focused_frame->GetRoutingID(), extent));
+}
+
+void WebContentsImpl::SelectRange(const gfx::Point& base,
+ const gfx::Point& extent) {
+ RenderFrameHost* focused_frame = GetFocusedFrame();
+ if (!focused_frame)
+ return;
+
+ focused_frame->Send(
+ new InputMsg_SelectRange(focused_frame->GetRoutingID(), base, extent));
+}
+
void WebContentsImpl::UpdatePreferredSize(const gfx::Size& pref_size) {
const gfx::Size old_size = GetPreferredSize();
preferred_size_ = pref_size;
@@ -3281,25 +3300,6 @@ void WebContentsImpl::SetIsLoading(bool is_loading,
type, Source<NavigationController>(&controller_), det);
}
-void WebContentsImpl::MoveRangeSelectionExtent(const gfx::Point& extent) {
- RenderFrameHost* focused_frame = GetFocusedFrame();
- if (!focused_frame)
- return;
-
- focused_frame->Send(new InputMsg_MoveRangeSelectionExtent(
- focused_frame->GetRoutingID(), extent));
-}
-
-void WebContentsImpl::SelectRange(const gfx::Point& base,
- const gfx::Point& extent) {
- RenderFrameHost* focused_frame = GetFocusedFrame();
- if (!focused_frame)
- return;
-
- focused_frame->Send(
- new InputMsg_SelectRange(focused_frame->GetRoutingID(), base, extent));
-}
-
void WebContentsImpl::UpdateMaxPageIDIfNecessary(RenderViewHost* rvh) {
// If we are creating a RVH for a restored controller, then we need to make
// sure the RenderView starts with a next_page_id_ larger than the number

Powered by Google App Engine
This is Rietveld 408576698