OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |