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 <string> | 8 #include <string> |
9 | 9 |
| 10 #include "base/callback.h" |
10 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
11 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
12 #include "content/public/browser/render_frame_host.h" | 13 #include "content/public/browser/render_frame_host.h" |
13 | 14 |
14 class GURL; | 15 class GURL; |
15 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params; | 16 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params; |
16 | 17 |
17 namespace base { | 18 namespace base { |
18 class FilePath; | 19 class FilePath; |
19 } | 20 } |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 77 |
77 // Hack to get this subframe to swap out, without yet moving over all the | 78 // Hack to get this subframe to swap out, without yet moving over all the |
78 // SwapOut state and machinery from RenderViewHost. | 79 // SwapOut state and machinery from RenderViewHost. |
79 void SwapOut(); | 80 void SwapOut(); |
80 void OnSwappedOut(bool timed_out); | 81 void OnSwappedOut(bool timed_out); |
81 bool is_swapped_out() { return is_swapped_out_; } | 82 bool is_swapped_out() { return is_swapped_out_; } |
82 void set_swapped_out(bool is_swapped_out) { | 83 void set_swapped_out(bool is_swapped_out) { |
83 is_swapped_out_ = is_swapped_out; | 84 is_swapped_out_ = is_swapped_out; |
84 } | 85 } |
85 | 86 |
| 87 // Sets the RVH for |this| as pending shutdown. |on_swap_out| will be called |
| 88 // when the SwapOutACK is received. |
| 89 void SetPendingShutdown(const base::Closure& on_swap_out); |
| 90 |
86 protected: | 91 protected: |
87 friend class RenderFrameHostFactory; | 92 friend class RenderFrameHostFactory; |
88 | 93 |
89 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost | 94 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost |
90 // should be the abstraction needed here, but we need RenderViewHost to pass | 95 // should be the abstraction needed here, but we need RenderViewHost to pass |
91 // into WebContentsObserver::FrameDetached for now. | 96 // into WebContentsObserver::FrameDetached for now. |
92 RenderFrameHostImpl(RenderViewHostImpl* render_view_host, | 97 RenderFrameHostImpl(RenderViewHostImpl* render_view_host, |
93 RenderFrameHostDelegate* delegate, | 98 RenderFrameHostDelegate* delegate, |
94 FrameTree* frame_tree, | 99 FrameTree* frame_tree, |
95 FrameTreeNode* frame_tree_node, | 100 FrameTreeNode* frame_tree_node, |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 150 |
146 int routing_id_; | 151 int routing_id_; |
147 bool is_swapped_out_; | 152 bool is_swapped_out_; |
148 | 153 |
149 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 154 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
150 }; | 155 }; |
151 | 156 |
152 } // namespace content | 157 } // namespace content |
153 | 158 |
154 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 159 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
OLD | NEW |