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 "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
12 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
13 #include "content/public/browser/render_frame_host.h" | 14 #include "content/public/browser/render_frame_host.h" |
14 | 15 |
15 class GURL; | 16 class GURL; |
16 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params; | 17 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params; |
17 | 18 |
18 namespace base { | 19 namespace base { |
19 class FilePath; | 20 class FilePath; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 76 |
76 // Hack to get this subframe to swap out, without yet moving over all the | 77 // Hack to get this subframe to swap out, without yet moving over all the |
77 // SwapOut state and machinery from RenderViewHost. | 78 // SwapOut state and machinery from RenderViewHost. |
78 void SwapOut(); | 79 void SwapOut(); |
79 void OnSwappedOut(bool timed_out); | 80 void OnSwappedOut(bool timed_out); |
80 bool is_swapped_out() { return is_swapped_out_; } | 81 bool is_swapped_out() { return is_swapped_out_; } |
81 void set_swapped_out(bool is_swapped_out) { | 82 void set_swapped_out(bool is_swapped_out) { |
82 is_swapped_out_ = is_swapped_out; | 83 is_swapped_out_ = is_swapped_out; |
83 } | 84 } |
84 | 85 |
| 86 // Sets the RVH for |this| as pending shutdown. |on_swap_out| will be called |
| 87 // when the SwapOutACK is received. |
| 88 void SetPendingShutdown(const base::Closure& on_swap_out); |
| 89 |
85 // TODO(nasko): This method is public so RenderViewHostImpl::Navigate can | 90 // TODO(nasko): This method is public so RenderViewHostImpl::Navigate can |
86 // call it directly. It should be made private once Navigate moves here. | 91 // call it directly. It should be made private once Navigate moves here. |
87 void OnDidStartLoading(); | 92 void OnDidStartLoading(); |
88 | 93 |
89 protected: | 94 protected: |
90 friend class RenderFrameHostFactory; | 95 friend class RenderFrameHostFactory; |
91 | 96 |
92 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost | 97 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost |
93 // should be the abstraction needed here, but we need RenderViewHost to pass | 98 // should be the abstraction needed here, but we need RenderViewHost to pass |
94 // into WebContentsObserver::FrameDetached for now. | 99 // into WebContentsObserver::FrameDetached for now. |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 | 165 |
161 int routing_id_; | 166 int routing_id_; |
162 bool is_swapped_out_; | 167 bool is_swapped_out_; |
163 | 168 |
164 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 169 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
165 }; | 170 }; |
166 | 171 |
167 } // namespace content | 172 } // namespace content |
168 | 173 |
169 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 174 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
OLD | NEW |