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_NAVIGATOR_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" |
9 #include "content/browser/frame_host/navigation_controller_impl.h" | 10 #include "content/browser/frame_host/navigation_controller_impl.h" |
10 #include "content/browser/frame_host/navigator.h" | 11 #include "content/browser/frame_host/navigator.h" |
11 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
12 | 13 |
| 14 class GURL; |
13 struct FrameMsg_Navigate_Params; | 15 struct FrameMsg_Navigate_Params; |
14 | 16 |
15 namespace content { | 17 namespace content { |
16 | 18 |
17 class NavigationControllerImpl; | 19 class NavigationControllerImpl; |
18 class NavigatorDelegate; | 20 class NavigatorDelegate; |
19 struct LoadCommittedDetails; | 21 struct LoadCommittedDetails; |
| 22 struct CommitNavigationParams; |
| 23 struct CommonNavigationParams; |
| 24 struct RequestNavigationParams; |
20 | 25 |
21 // This class is an implementation of Navigator, responsible for managing | 26 // This class is an implementation of Navigator, responsible for managing |
22 // navigations in regular browser tabs. | 27 // navigations in regular browser tabs. |
23 class CONTENT_EXPORT NavigatorImpl : public Navigator { | 28 class CONTENT_EXPORT NavigatorImpl : public Navigator { |
24 public: | 29 public: |
25 NavigatorImpl(NavigationControllerImpl* navigation_controller, | 30 NavigatorImpl(NavigationControllerImpl* navigation_controller, |
26 NavigatorDelegate* delegate); | 31 NavigatorDelegate* delegate); |
27 | 32 |
28 // Fills in |params| based on the content of |entry|. | |
29 static void MakeNavigateParams(const NavigationEntryImpl& entry, | |
30 const NavigationControllerImpl& controller, | |
31 NavigationController::ReloadType reload_type, | |
32 base::TimeTicks navigation_start, | |
33 FrameMsg_Navigate_Params* params); | |
34 | |
35 // Navigator implementation. | 33 // Navigator implementation. |
36 virtual NavigationController* GetController() OVERRIDE; | 34 virtual NavigationController* GetController() OVERRIDE; |
37 virtual void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host, | 35 virtual void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host, |
38 const GURL& url, | 36 const GURL& url, |
39 bool is_transition_navigation) OVERRIDE; | 37 bool is_transition_navigation) OVERRIDE; |
40 virtual void DidFailProvisionalLoadWithError( | 38 virtual void DidFailProvisionalLoadWithError( |
41 RenderFrameHostImpl* render_frame_host, | 39 RenderFrameHostImpl* render_frame_host, |
42 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) | 40 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) |
43 OVERRIDE; | 41 OVERRIDE; |
44 virtual void DidFailLoadWithError( | 42 virtual void DidFailLoadWithError( |
(...skipping 19 matching lines...) Expand all Loading... |
64 const GURL& url, | 62 const GURL& url, |
65 const std::vector<GURL>& redirect_chain, | 63 const std::vector<GURL>& redirect_chain, |
66 const Referrer& referrer, | 64 const Referrer& referrer, |
67 ui::PageTransition page_transition, | 65 ui::PageTransition page_transition, |
68 WindowOpenDisposition disposition, | 66 WindowOpenDisposition disposition, |
69 const GlobalRequestID& transferred_global_request_id, | 67 const GlobalRequestID& transferred_global_request_id, |
70 bool should_replace_current_entry, | 68 bool should_replace_current_entry, |
71 bool user_gesture) OVERRIDE; | 69 bool user_gesture) OVERRIDE; |
72 virtual void CommitNavigation( | 70 virtual void CommitNavigation( |
73 RenderFrameHostImpl* render_frame_host, | 71 RenderFrameHostImpl* render_frame_host, |
74 const NavigationBeforeCommitInfo& info) OVERRIDE; | 72 const GURL& stream_url, |
| 73 const CommonNavigationParams& common_params, |
| 74 const CommitNavigationParams& commit_params) OVERRIDE; |
75 | 75 |
76 private: | 76 private: |
77 virtual ~NavigatorImpl() {} | 77 virtual ~NavigatorImpl() {} |
78 | 78 |
79 // Navigates to the given entry, which must be the pending entry. Private | 79 // Navigates to the given entry, which must be the pending entry. Private |
80 // because all callers should use NavigateToPendingEntry. | 80 // because all callers should use NavigateToPendingEntry. |
81 bool NavigateToEntry( | 81 bool NavigateToEntry( |
82 RenderFrameHostImpl* render_frame_host, | 82 RenderFrameHostImpl* render_frame_host, |
83 const NavigationEntryImpl& entry, | 83 const NavigationEntryImpl& entry, |
84 NavigationController::ReloadType reload_type); | 84 NavigationController::ReloadType reload_type); |
(...skipping 13 matching lines...) Expand all Loading... |
98 // Used to notify the object embedding this Navigator about navigation | 98 // Used to notify the object embedding this Navigator about navigation |
99 // events. Can be NULL in tests. | 99 // events. Can be NULL in tests. |
100 NavigatorDelegate* delegate_; | 100 NavigatorDelegate* delegate_; |
101 | 101 |
102 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl); | 102 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl); |
103 }; | 103 }; |
104 | 104 |
105 } // namespace content | 105 } // namespace content |
106 | 106 |
107 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ | 107 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ |
OLD | NEW |