| 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 namespace content { | 13 namespace content { |
| 14 | 14 |
| 15 class NavigationControllerImpl; | 15 class NavigationControllerImpl; |
| 16 class NavigatorDelegate; | 16 class NavigatorDelegate; |
| 17 struct LoadCommittedDetails; | 17 struct LoadCommittedDetails; |
| 18 | 18 |
| 19 // This class is an implementation of Navigator, responsible for managing | 19 // This class is an implementation of Navigator, responsible for managing |
| 20 // navigations in regular browser tabs. | 20 // navigations in regular browser tabs. |
| 21 class CONTENT_EXPORT NavigatorImpl : public Navigator { | 21 class CONTENT_EXPORT NavigatorImpl : public Navigator { |
| 22 public: | 22 public: |
| 23 NavigatorImpl(NavigationControllerImpl* navigation_controller, | 23 NavigatorImpl(NavigationControllerImpl* navigation_controller, |
| 24 NavigatorDelegate* delegate); | 24 NavigatorDelegate* delegate); |
| 25 | 25 |
| 26 // Navigator implementation. | 26 // Navigator implementation. |
| 27 virtual NavigationController* GetController() OVERRIDE; | 27 virtual NavigationController* GetController() OVERRIDE; |
| 28 virtual void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host, | 28 virtual void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host, |
| 29 int parent_routing_id, | 29 int parent_routing_id, |
| 30 const GURL& url) OVERRIDE; | 30 const GURL& url, |
| 31 bool is_transition_navigation) OVERRIDE; |
| 31 virtual void DidFailProvisionalLoadWithError( | 32 virtual void DidFailProvisionalLoadWithError( |
| 32 RenderFrameHostImpl* render_frame_host, | 33 RenderFrameHostImpl* render_frame_host, |
| 33 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) | 34 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) |
| 34 OVERRIDE; | 35 OVERRIDE; |
| 35 virtual void DidFailLoadWithError( | 36 virtual void DidFailLoadWithError( |
| 36 RenderFrameHostImpl* render_frame_host, | 37 RenderFrameHostImpl* render_frame_host, |
| 37 const GURL& url, | 38 const GURL& url, |
| 38 int error_code, | 39 int error_code, |
| 39 const base::string16& error_description) OVERRIDE; | 40 const base::string16& error_description) OVERRIDE; |
| 40 virtual void DidRedirectProvisionalLoad( | 41 virtual void DidRedirectProvisionalLoad( |
| 41 RenderFrameHostImpl* render_frame_host, | 42 RenderFrameHostImpl* render_frame_host, |
| 42 int32 page_id, | 43 int32 page_id, |
| 43 const GURL& source_url, | 44 const GURL& source_url, |
| 44 const GURL& target_url) OVERRIDE; | 45 const GURL& target_url) OVERRIDE; |
| 45 virtual void DidNavigate( | 46 virtual void DidNavigate( |
| 46 RenderFrameHostImpl* render_frame_host, | 47 RenderFrameHostImpl* render_frame_host, |
| 47 const FrameHostMsg_DidCommitProvisionalLoad_Params& | 48 const FrameHostMsg_DidCommitProvisionalLoad_Params& |
| 48 input_params) OVERRIDE; | 49 input_params) OVERRIDE; |
| 49 virtual bool NavigateToPendingEntry( | 50 virtual bool NavigateToPendingEntry( |
| 50 RenderFrameHostImpl* render_frame_host, | 51 RenderFrameHostImpl* render_frame_host, |
| 51 NavigationController::ReloadType reload_type) OVERRIDE; | 52 NavigationController::ReloadType reload_type) OVERRIDE; |
| 52 virtual base::TimeTicks GetCurrentLoadStart() OVERRIDE; | 53 virtual base::TimeTicks GetCurrentLoadStart() OVERRIDE; |
| 53 virtual void RequestOpenURL(RenderFrameHostImpl* render_frame_host, | 54 virtual void RequestOpenURL(RenderFrameHostImpl* render_frame_host, |
| 54 const GURL& url, | 55 const GURL& url, |
| 55 const Referrer& referrer, | 56 const Referrer& referrer, |
| 56 WindowOpenDisposition disposition, | 57 WindowOpenDisposition disposition, |
| 57 bool should_replace_current_entry, | 58 bool should_replace_current_entry, |
| 58 bool user_gesture) OVERRIDE; | 59 bool user_gesture, |
| 60 bool is_transition_navigation) OVERRIDE; |
| 59 virtual void RequestTransferURL( | 61 virtual void RequestTransferURL( |
| 60 RenderFrameHostImpl* render_frame_host, | 62 RenderFrameHostImpl* render_frame_host, |
| 61 const GURL& url, | 63 const GURL& url, |
| 62 const std::vector<GURL>& redirect_chain, | 64 const std::vector<GURL>& redirect_chain, |
| 63 const Referrer& referrer, | 65 const Referrer& referrer, |
| 64 PageTransition page_transition, | 66 PageTransition page_transition, |
| 65 WindowOpenDisposition disposition, | 67 WindowOpenDisposition disposition, |
| 66 const GlobalRequestID& transferred_global_request_id, | 68 const GlobalRequestID& transferred_global_request_id, |
| 67 bool should_replace_current_entry, | 69 bool should_replace_current_entry, |
| 68 bool user_gesture) OVERRIDE; | 70 bool user_gesture, |
| 71 bool is_transition_navigation) OVERRIDE; |
| 69 | 72 |
| 70 private: | 73 private: |
| 71 virtual ~NavigatorImpl() {} | 74 virtual ~NavigatorImpl() {} |
| 72 | 75 |
| 73 // Navigates to the given entry, which must be the pending entry. Private | 76 // Navigates to the given entry, which must be the pending entry. Private |
| 74 // because all callers should use NavigateToPendingEntry. | 77 // because all callers should use NavigateToPendingEntry. |
| 75 bool NavigateToEntry( | 78 bool NavigateToEntry( |
| 76 RenderFrameHostImpl* render_frame_host, | 79 RenderFrameHostImpl* render_frame_host, |
| 77 const NavigationEntryImpl& entry, | 80 const NavigationEntryImpl& entry, |
| 78 NavigationController::ReloadType reload_type); | 81 NavigationController::ReloadType reload_type); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 91 | 94 |
| 92 // System time at which the current load was started. | 95 // System time at which the current load was started. |
| 93 base::TimeTicks current_load_start_; | 96 base::TimeTicks current_load_start_; |
| 94 | 97 |
| 95 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl); | 98 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl); |
| 96 }; | 99 }; |
| 97 | 100 |
| 98 } // namespace content | 101 } // namespace content |
| 99 | 102 |
| 100 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ | 103 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ |
| OLD | NEW |