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_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "content/browser/renderer_host/render_view_host_delegate.h" | 14 #include "content/browser/renderer_host/render_view_host_delegate.h" |
15 #include "content/browser/site_instance_impl.h" | 15 #include "content/browser/site_instance_impl.h" |
16 #include "content/common/content_export.h" | 16 #include "content/common/content_export.h" |
17 #include "content/public/browser/global_request_id.h" | 17 #include "content/public/browser/global_request_id.h" |
18 #include "content/public/browser/notification_observer.h" | 18 #include "content/public/browser/notification_observer.h" |
19 #include "content/public/browser/notification_registrar.h" | 19 #include "content/public/browser/notification_registrar.h" |
20 #include "content/public/common/referrer.h" | 20 #include "content/public/common/referrer.h" |
21 #include "ui/base/page_transition_types.h" | 21 #include "ui/base/page_transition_types.h" |
22 | 22 |
23 struct FrameMsg_Navigate_Params; | 23 struct FrameMsg_Navigate_Params; |
24 | 24 |
25 namespace content { | 25 namespace content { |
26 class BrowserContext; | 26 class BrowserContext; |
27 class CrossProcessFrameConnector; | 27 class CrossProcessFrameConnector; |
28 class CrossSiteTransferringRequest; | 28 class CrossSiteTransferringRequest; |
| 29 class FrameNavigationEntry; |
29 class FrameTreeNode; | 30 class FrameTreeNode; |
30 class InterstitialPageImpl; | 31 class InterstitialPageImpl; |
31 class NavigationControllerImpl; | 32 class NavigationControllerImpl; |
32 class NavigationEntry; | 33 class NavigationEntry; |
33 class NavigationEntryImpl; | 34 class NavigationEntryImpl; |
34 class NavigationRequest; | 35 class NavigationRequest; |
35 class NavigatorTestWithBrowserSideNavigation; | 36 class NavigatorTestWithBrowserSideNavigation; |
36 class RenderFrameHost; | 37 class RenderFrameHost; |
37 class RenderFrameHostDelegate; | 38 class RenderFrameHostDelegate; |
38 class RenderFrameHostImpl; | 39 class RenderFrameHostImpl; |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 // Returns the speculative WebUI for the navigation (a newly created one or | 244 // Returns the speculative WebUI for the navigation (a newly created one or |
244 // the current one if it should be reused). If none is set returns nullptr. | 245 // the current one if it should be reused). If none is set returns nullptr. |
245 WebUIImpl* speculative_web_ui() const { | 246 WebUIImpl* speculative_web_ui() const { |
246 return should_reuse_web_ui_ ? web_ui_.get() : speculative_web_ui_.get(); | 247 return should_reuse_web_ui_ ? web_ui_.get() : speculative_web_ui_.get(); |
247 } | 248 } |
248 | 249 |
249 // Called when we want to instruct the renderer to navigate to the given | 250 // Called when we want to instruct the renderer to navigate to the given |
250 // navigation entry. It may create a new RenderFrameHost or re-use an existing | 251 // navigation entry. It may create a new RenderFrameHost or re-use an existing |
251 // one. The RenderFrameHost to navigate will be returned. Returns NULL if one | 252 // one. The RenderFrameHost to navigate will be returned. Returns NULL if one |
252 // could not be created. | 253 // could not be created. |
253 RenderFrameHostImpl* Navigate(const NavigationEntryImpl& entry); | 254 RenderFrameHostImpl* Navigate(const FrameNavigationEntry& frame_entry, |
| 255 const NavigationEntryImpl& entry); |
| 256 |
| 257 // Convenience function for the main frame's RenderFrameHostManager, which |
| 258 // navigates to the root FrameNavigationEntry for |entry|. |
| 259 RenderFrameHostImpl* NavigateMainFrame(const NavigationEntryImpl& entry); |
254 | 260 |
255 // Instructs the various live views to stop. Called when the user directed the | 261 // Instructs the various live views to stop. Called when the user directed the |
256 // page to stop loading. | 262 // page to stop loading. |
257 void Stop(); | 263 void Stop(); |
258 | 264 |
259 // Notifies the regular and pending RenderViewHosts that a load is or is not | 265 // Notifies the regular and pending RenderViewHosts that a load is or is not |
260 // happening. Even though the message is only for one of them, we don't know | 266 // happening. Even though the message is only for one of them, we don't know |
261 // which one so we tell both. | 267 // which one so we tell both. |
262 void SetIsLoading(bool is_loading); | 268 void SetIsLoading(bool is_loading); |
263 | 269 |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 bool should_reuse_web_ui_; | 711 bool should_reuse_web_ui_; |
706 | 712 |
707 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; | 713 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; |
708 | 714 |
709 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); | 715 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); |
710 }; | 716 }; |
711 | 717 |
712 } // namespace content | 718 } // namespace content |
713 | 719 |
714 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ | 720 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ |
OLD | NEW |