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

Side by Side Diff: content/browser/frame_host/frame_tree.h

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 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_
6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // Update the frame tree after a process exits. Any nodes currently using the 81 // Update the frame tree after a process exits. Any nodes currently using the
82 // given |render_view_host| will lose all their children. 82 // given |render_view_host| will lose all their children.
83 // TODO(creis): This should take a RenderProcessHost once RenderFrameHost 83 // TODO(creis): This should take a RenderProcessHost once RenderFrameHost
84 // knows its process. Until then, we would just be asking the RenderViewHost 84 // knows its process. Until then, we would just be asking the RenderViewHost
85 // for its process, so we'll skip that step. 85 // for its process, so we'll skip that step.
86 void RenderProcessGone(RenderViewHost* render_view_host); 86 void RenderProcessGone(RenderViewHost* render_view_host);
87 87
88 // Convenience accessor for the main frame's RenderFrameHostImpl. 88 // Convenience accessor for the main frame's RenderFrameHostImpl.
89 RenderFrameHostImpl* GetMainFrame() const; 89 RenderFrameHostImpl* GetMainFrame() const;
90 90
91 // Returns the focused frame.
92 FrameTreeNode* GetFocusedFrame();
93
94 // Sets the focused frame.
95 void SetFocusedFrame(FrameTreeNode* node);
96
91 // Allows a client to listen for frame removal. The listener should expect 97 // Allows a client to listen for frame removal. The listener should expect
92 // to receive the RenderViewHostImpl containing the frame and the renderer- 98 // to receive the RenderViewHostImpl containing the frame and the renderer-
93 // specific frame routing ID of the removed frame. 99 // specific frame routing ID of the removed frame.
94 // TODO(creis): These parameters will later change to be the RenderFrameHost. 100 // TODO(creis): These parameters will later change to be the RenderFrameHost.
95 void SetFrameRemoveListener( 101 void SetFrameRemoveListener(
96 const base::Callback<void(RenderViewHostImpl*, int)>& on_frame_removed); 102 const base::Callback<void(RenderViewHostImpl*, int)>& on_frame_removed);
97 103
98 // Creates a RenderViewHost for a new main frame RenderFrameHost in the given 104 // Creates a RenderViewHost for a new main frame RenderFrameHost in the given
99 // |site_instance|. The RenderViewHost will have its Shutdown method called 105 // |site_instance|. The RenderViewHost will have its Shutdown method called
100 // when all of the RenderFrameHosts using it are deleted. 106 // when all of the RenderFrameHosts using it are deleted.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 144
139 // Map of SiteInstance ID to RenderViewHosts that are pending shutdown. The 145 // Map of SiteInstance ID to RenderViewHosts that are pending shutdown. The
140 // renderers of these RVH are currently executing the unload event in 146 // renderers of these RVH are currently executing the unload event in
141 // background. When the SwapOutACK is received, they will be deleted. In the 147 // background. When the SwapOutACK is received, they will be deleted. In the
142 // meantime, they are kept in this map, as they should not be reused (part of 148 // meantime, they are kept in this map, as they should not be reused (part of
143 // their state is already gone away). 149 // their state is already gone away).
144 RenderViewHostMultiMap render_view_host_pending_shutdown_map_; 150 RenderViewHostMultiMap render_view_host_pending_shutdown_map_;
145 151
146 scoped_ptr<FrameTreeNode> root_; 152 scoped_ptr<FrameTreeNode> root_;
147 153
154 int64 focused_frame_tree_node_id_;
155
148 base::Callback<void(RenderViewHostImpl*, int)> on_frame_removed_; 156 base::Callback<void(RenderViewHostImpl*, int)> on_frame_removed_;
149 157
150 DISALLOW_COPY_AND_ASSIGN(FrameTree); 158 DISALLOW_COPY_AND_ASSIGN(FrameTree);
151 }; 159 };
152 160
153 } // namespace content 161 } // namespace content
154 162
155 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ 163 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698