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

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: Added some unit tests 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 fa8f2f30cf4f1510c1b65e5b5e8a4a382807bf0c..cbc9096c8811b77ed7bb31b0ce3b99ed73772279 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1960,6 +1960,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;
@@ -3292,25 +3311,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