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

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

Issue 1406103005: Preserve page-level focus for subframe cross-process navigations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@focus-page
Patch Set: Add comment Created 5 years, 1 month 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
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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 // Returns true if at least one of the nodes in this FrameTree is loading. 146 // Returns true if at least one of the nodes in this FrameTree is loading.
147 bool IsLoading(); 147 bool IsLoading();
148 148
149 // Set page-level focus in all SiteInstances involved in rendering 149 // Set page-level focus in all SiteInstances involved in rendering
150 // this FrameTree, not including the current main frame's 150 // this FrameTree, not including the current main frame's
151 // SiteInstance. The focus update will be sent via the main frame's proxies 151 // SiteInstance. The focus update will be sent via the main frame's proxies
152 // in those SiteInstances. 152 // in those SiteInstances.
153 void ReplicatePageFocus(bool is_focused); 153 void ReplicatePageFocus(bool is_focused);
154 154
155 // Updates page-level focus for this FrameTree in the subframe renderer
156 // identified by |instance|.
157 void SetPageFocus(SiteInstance* instance, bool is_focused);
158
155 private: 159 private:
156 FRIEND_TEST_ALL_PREFIXES(RenderFrameHostImplBrowserTest, RemoveFocusedFrame); 160 FRIEND_TEST_ALL_PREFIXES(RenderFrameHostImplBrowserTest, RemoveFocusedFrame);
157 typedef base::hash_map<int, RenderViewHostImpl*> RenderViewHostMap; 161 typedef base::hash_map<int, RenderViewHostImpl*> RenderViewHostMap;
158 typedef std::multimap<int, RenderViewHostImpl*> RenderViewHostMultiMap; 162 typedef std::multimap<int, RenderViewHostImpl*> RenderViewHostMultiMap;
159 163
160 // A variation to the public ForEach method with a difference that the subtree 164 // A variation to the public ForEach method with a difference that the subtree
161 // starting at |skip_this_subtree| will not be recursed into. 165 // starting at |skip_this_subtree| will not be recursed into.
162 void ForEach(const base::Callback<bool(FrameTreeNode*)>& on_node, 166 void ForEach(const base::Callback<bool(FrameTreeNode*)>& on_node,
163 FrameTreeNode* skip_this_subtree) const; 167 FrameTreeNode* skip_this_subtree) const;
164 168
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 202
199 // Overall load progress. 203 // Overall load progress.
200 double load_progress_; 204 double load_progress_;
201 205
202 DISALLOW_COPY_AND_ASSIGN(FrameTree); 206 DISALLOW_COPY_AND_ASSIGN(FrameTree);
203 }; 207 };
204 208
205 } // namespace content 209 } // namespace content
206 210
207 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ 211 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/cross_process_frame_connector.cc ('k') | content/browser/frame_host/frame_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698