Almost finish moving context_menu_node_ from RenderViewImpl to RenderFrameImpl.
The remaining uses of context_menu_node_ are easy to convert, but I've left them to a future cl so as to not make this cl any bigger. The main part of this cl is to move the Copy edit command from RenderViewHost to RenderFrameHost. To do that, I also had to convert Cut and Paste at the same time because of BrowserView.
BUG=304341
[email protected]
Review URL: https://codereview.chromium.org/183923030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255735 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 808f58a0..9d5fb1f 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -584,6 +584,12 @@
return frame_tree_.root()->current_frame_host();
}
+RenderFrameHost* WebContentsImpl::GetFocusedFrame() {
+ if (!frame_tree_.GetFocusedFrame())
+ return NULL;
+ return frame_tree_.GetFocusedFrame()->current_frame_host();
+}
+
void WebContentsImpl::ForEachFrame(
const base::Callback<void(RenderFrameHost*)>& on_frame) {
frame_tree_.ForEach(base::Bind(&ForEachFrameInternal, on_frame));