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/callback.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
14 #include "content/public/browser/render_frame_host.h" | 14 #include "content/public/browser/render_frame_host.h" |
15 | 15 |
16 class GURL; | 16 class GURL; |
17 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params; | 17 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params; |
| 18 struct FrameMsg_Navigate_Params; |
18 | 19 |
19 namespace base { | 20 namespace base { |
20 class FilePath; | 21 class FilePath; |
21 } | 22 } |
22 | 23 |
23 namespace content { | 24 namespace content { |
24 | 25 |
25 class CrossProcessFrameConnector; | 26 class CrossProcessFrameConnector; |
26 class FrameTree; | 27 class FrameTree; |
27 class FrameTreeNode; | 28 class FrameTreeNode; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 } | 88 } |
88 | 89 |
89 // Sets the RVH for |this| as pending shutdown. |on_swap_out| will be called | 90 // Sets the RVH for |this| as pending shutdown. |on_swap_out| will be called |
90 // when the SwapOutACK is received. | 91 // when the SwapOutACK is received. |
91 void SetPendingShutdown(const base::Closure& on_swap_out); | 92 void SetPendingShutdown(const base::Closure& on_swap_out); |
92 | 93 |
93 // TODO(nasko): This method is public so RenderViewHostImpl::Navigate can | 94 // TODO(nasko): This method is public so RenderViewHostImpl::Navigate can |
94 // call it directly. It should be made private once Navigate moves here. | 95 // call it directly. It should be made private once Navigate moves here. |
95 void OnDidStartLoading(); | 96 void OnDidStartLoading(); |
96 | 97 |
| 98 // Sends the given navigation message. Use this rather than sending it |
| 99 // yourself since this does the internal bookkeeping described below. This |
| 100 // function takes ownership of the provided message pointer. |
| 101 // |
| 102 // If a cross-site request is in progress, we may be suspended while waiting |
| 103 // for the onbeforeunload handler, so this function might buffer the message |
| 104 // rather than sending it. |
| 105 void Navigate(const FrameMsg_Navigate_Params& params); |
| 106 |
| 107 // Load the specified URL; this is a shortcut for Navigate(). |
| 108 void NavigateToURL(const GURL& url); |
| 109 |
97 protected: | 110 protected: |
98 friend class RenderFrameHostFactory; | 111 friend class RenderFrameHostFactory; |
99 | 112 |
100 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost | 113 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost |
101 // should be the abstraction needed here, but we need RenderViewHost to pass | 114 // should be the abstraction needed here, but we need RenderViewHost to pass |
102 // into WebContentsObserver::FrameDetached for now. | 115 // into WebContentsObserver::FrameDetached for now. |
103 RenderFrameHostImpl(RenderViewHostImpl* render_view_host, | 116 RenderFrameHostImpl(RenderViewHostImpl* render_view_host, |
104 RenderFrameHostDelegate* delegate, | 117 RenderFrameHostDelegate* delegate, |
105 FrameTree* frame_tree, | 118 FrameTree* frame_tree, |
106 FrameTreeNode* frame_tree_node, | 119 FrameTreeNode* frame_tree_node, |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 | 181 |
169 int routing_id_; | 182 int routing_id_; |
170 bool is_swapped_out_; | 183 bool is_swapped_out_; |
171 | 184 |
172 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 185 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
173 }; | 186 }; |
174 | 187 |
175 } // namespace content | 188 } // namespace content |
176 | 189 |
177 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 190 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
OLD | NEW |