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

Unified Diff: content/browser/frame_host/frame_tree.cc

Issue 183923030: Almost finish moving context_menu_node_ from RenderViewImpl to RenderFrameImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync to get android fix Created 6 years, 9 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/browser/frame_host/frame_tree.h ('k') | content/browser/frame_host/render_frame_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/frame_tree.cc
===================================================================
--- content/browser/frame_host/frame_tree.cc (revision 255719)
+++ content/browser/frame_host/frame_tree.cc (working copy)
@@ -71,7 +71,8 @@
render_view_delegate,
render_widget_delegate,
manager_delegate,
- std::string())) {
+ std::string())),
+ focused_frame_tree_node_id_(-1) {
}
FrameTree::~FrameTree() {
@@ -138,6 +139,7 @@
void FrameTree::ResetForMainFrameSwap() {
root_->ResetForNewProcess();
+ focused_frame_tree_node_id_ = -1;
}
void FrameTree::RenderProcessGone(RenderViewHost* render_view_host) {
@@ -154,6 +156,14 @@
return root_->current_frame_host();
}
+FrameTreeNode* FrameTree::GetFocusedFrame() {
+ return FindByID(focused_frame_tree_node_id_);
+}
+
+void FrameTree::SetFocusedFrame(FrameTreeNode* node) {
+ focused_frame_tree_node_id_ = node->frame_tree_node_id();
+}
+
void FrameTree::SetFrameRemoveListener(
const base::Callback<void(RenderViewHostImpl*, int)>& on_frame_removed) {
on_frame_removed_ = on_frame_removed;
« no previous file with comments | « content/browser/frame_host/frame_tree.h ('k') | content/browser/frame_host/render_frame_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698