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 "content/browser/frame_host/navigation_controller_impl.h" | 9 #include "content/browser/frame_host/navigation_controller_impl.h" |
10 #include "content/browser/frame_host/navigator.h" | 10 #include "content/browser/frame_host/navigator.h" |
11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
12 | 12 |
| 13 struct FrameMsg_Navigate_Params; |
| 14 |
13 namespace content { | 15 namespace content { |
14 | 16 |
15 class NavigationControllerImpl; | 17 class NavigationControllerImpl; |
16 class NavigatorDelegate; | 18 class NavigatorDelegate; |
17 struct LoadCommittedDetails; | 19 struct LoadCommittedDetails; |
18 | 20 |
19 // This class is an implementation of Navigator, responsible for managing | 21 // This class is an implementation of Navigator, responsible for managing |
20 // navigations in regular browser tabs. | 22 // navigations in regular browser tabs. |
21 class CONTENT_EXPORT NavigatorImpl : public Navigator { | 23 class CONTENT_EXPORT NavigatorImpl : public Navigator { |
22 public: | 24 public: |
23 NavigatorImpl(NavigationControllerImpl* navigation_controller, | 25 NavigatorImpl(NavigationControllerImpl* navigation_controller, |
24 NavigatorDelegate* delegate); | 26 NavigatorDelegate* delegate); |
25 | 27 |
| 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 |
26 // Navigator implementation. | 35 // Navigator implementation. |
27 virtual NavigationController* GetController() OVERRIDE; | 36 virtual NavigationController* GetController() OVERRIDE; |
28 virtual void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host, | 37 virtual void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host, |
29 const GURL& url, | 38 const GURL& url, |
30 bool is_transition_navigation) OVERRIDE; | 39 bool is_transition_navigation) OVERRIDE; |
31 virtual void DidFailProvisionalLoadWithError( | 40 virtual void DidFailProvisionalLoadWithError( |
32 RenderFrameHostImpl* render_frame_host, | 41 RenderFrameHostImpl* render_frame_host, |
33 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) | 42 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) |
34 OVERRIDE; | 43 OVERRIDE; |
35 virtual void DidFailLoadWithError( | 44 virtual void DidFailLoadWithError( |
(...skipping 24 matching lines...) Expand all Loading... |
60 RenderFrameHostImpl* render_frame_host, | 69 RenderFrameHostImpl* render_frame_host, |
61 const GURL& url, | 70 const GURL& url, |
62 const std::vector<GURL>& redirect_chain, | 71 const std::vector<GURL>& redirect_chain, |
63 const Referrer& referrer, | 72 const Referrer& referrer, |
64 PageTransition page_transition, | 73 PageTransition page_transition, |
65 WindowOpenDisposition disposition, | 74 WindowOpenDisposition disposition, |
66 const GlobalRequestID& transferred_global_request_id, | 75 const GlobalRequestID& transferred_global_request_id, |
67 bool should_replace_current_entry, | 76 bool should_replace_current_entry, |
68 bool user_gesture) OVERRIDE; | 77 bool user_gesture) OVERRIDE; |
69 | 78 |
| 79 // Will crash the browser if |render_frame_host| is a Web-UI renderer that |
| 80 // tries to display a non Web UI |url|. |
| 81 virtual void CheckWebUIRendererDoesNotDisplayNormalURL( |
| 82 RenderFrameHostImpl* render_frame_host, |
| 83 const GURL& url) OVERRIDE; |
| 84 |
70 private: | 85 private: |
71 virtual ~NavigatorImpl() {} | 86 virtual ~NavigatorImpl() {} |
72 | 87 |
73 // Navigates to the given entry, which must be the pending entry. Private | 88 // Navigates to the given entry, which must be the pending entry. Private |
74 // because all callers should use NavigateToPendingEntry. | 89 // because all callers should use NavigateToPendingEntry. |
75 bool NavigateToEntry( | 90 bool NavigateToEntry( |
76 RenderFrameHostImpl* render_frame_host, | 91 RenderFrameHostImpl* render_frame_host, |
77 const NavigationEntryImpl& entry, | 92 const NavigationEntryImpl& entry, |
78 NavigationController::ReloadType reload_type); | 93 NavigationController::ReloadType reload_type); |
79 | 94 |
(...skipping 11 matching lines...) Expand all Loading... |
91 | 106 |
92 // System time at which the current load was started. | 107 // System time at which the current load was started. |
93 base::TimeTicks current_load_start_; | 108 base::TimeTicks current_load_start_; |
94 | 109 |
95 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl); | 110 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl); |
96 }; | 111 }; |
97 | 112 |
98 } // namespace content | 113 } // namespace content |
99 | 114 |
100 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ | 115 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ |
OLD | NEW |