Chromium Code Reviews| 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_RENDER_FRAME_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 130 // a blank document. The renderer should preserve the Frame object until it | 130 // a blank document. The renderer should preserve the Frame object until it |
| 131 // exits, in case we come back. The renderer can exit if it has no other | 131 // exits, in case we come back. The renderer can exit if it has no other |
| 132 // active RenderFrames, but not until WasSwappedOut is called (when it is no | 132 // active RenderFrames, but not until WasSwappedOut is called (when it is no |
| 133 // longer visible). | 133 // longer visible). |
| 134 void SwapOut(); | 134 void SwapOut(); |
| 135 | 135 |
| 136 void OnSwappedOut(bool timed_out); | 136 void OnSwappedOut(bool timed_out); |
| 137 bool is_swapped_out() { return is_swapped_out_; } | 137 bool is_swapped_out() { return is_swapped_out_; } |
| 138 void set_swapped_out(bool is_swapped_out) { | 138 void set_swapped_out(bool is_swapped_out) { |
| 139 is_swapped_out_ = is_swapped_out; | 139 is_swapped_out_ = is_swapped_out; |
| 140 created_for_pending_ = false; | |
| 141 } | |
| 142 bool is_created_for_pending() { | |
| 143 return created_for_pending_; | |
| 140 } | 144 } |
| 141 | 145 |
| 142 // Sets the RVH for |this| as pending shutdown. |on_swap_out| will be called | 146 // Sets the RVH for |this| as pending shutdown. |on_swap_out| will be called |
| 143 // when the SwapOutACK is received. | 147 // when the SwapOutACK is received. |
| 144 void SetPendingShutdown(const base::Closure& on_swap_out); | 148 void SetPendingShutdown(const base::Closure& on_swap_out); |
| 145 | 149 |
| 146 // TODO(nasko): This method is public so RenderViewHostImpl::Navigate can | 150 // TODO(nasko): This method is public so RenderViewHostImpl::Navigate can |
| 147 // call it directly. It should be made private once Navigate moves here. | 151 // call it directly. It should be made private once Navigate moves here. |
| 148 // |to_different_document| will be true unless the load is a fragment | 152 // |to_different_document| will be true unless the load is a fragment |
| 149 // navigation, or triggered by history.pushState/replaceState. | 153 // navigation, or triggered by history.pushState/replaceState. |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 245 // The FrameTreeNode which this RenderFrameHostImpl is hosted in. | 249 // The FrameTreeNode which this RenderFrameHostImpl is hosted in. |
| 246 FrameTreeNode* frame_tree_node_; | 250 FrameTreeNode* frame_tree_node_; |
| 247 | 251 |
| 248 // The mapping of pending JavaScript calls created by | 252 // The mapping of pending JavaScript calls created by |
| 249 // ExecuteJavaScript and their corresponding callbacks. | 253 // ExecuteJavaScript and their corresponding callbacks. |
| 250 std::map<int, JavaScriptResultCallback> javascript_callbacks_; | 254 std::map<int, JavaScriptResultCallback> javascript_callbacks_; |
| 251 | 255 |
| 252 int routing_id_; | 256 int routing_id_; |
| 253 bool is_swapped_out_; | 257 bool is_swapped_out_; |
| 254 | 258 |
| 259 // This boolean indicates whether this RenderFrameHostImpl was created as a | |
| 260 // pending RFH in cross-site navigation. Once it has swapped out once, | |
| 261 // the value is set to false for the lifetime of the object. | |
| 262 // TODO(nasko): This is a nasty hack which should be removed once we can | |
| 263 // properly transition RenderFrameHost to RenderFrameProxyHost and vice versa. | |
| 264 bool created_for_pending_; | |
|
Charlie Reis
2014/03/31 23:22:35
What was wrong with the active_view_count hack? I
nasko
2014/04/09 17:52:01
Done.
| |
| 265 | |
| 255 // When the last BeforeUnload message was sent. | 266 // When the last BeforeUnload message was sent. |
| 256 base::TimeTicks send_before_unload_start_time_; | 267 base::TimeTicks send_before_unload_start_time_; |
| 257 | 268 |
| 258 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 269 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
| 259 }; | 270 }; |
| 260 | 271 |
| 261 } // namespace content | 272 } // namespace content |
| 262 | 273 |
| 263 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 274 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| OLD | NEW |