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/containers/scoped_ptr_hash_map.h" | 8 #include "base/containers/scoped_ptr_hash_map.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 struct RequestNavigationParams; | 29 struct RequestNavigationParams; |
30 | 30 |
31 // This class is an implementation of Navigator, responsible for managing | 31 // This class is an implementation of Navigator, responsible for managing |
32 // navigations in regular browser tabs. | 32 // navigations in regular browser tabs. |
33 class CONTENT_EXPORT NavigatorImpl : public Navigator { | 33 class CONTENT_EXPORT NavigatorImpl : public Navigator { |
34 public: | 34 public: |
35 NavigatorImpl(NavigationControllerImpl* navigation_controller, | 35 NavigatorImpl(NavigationControllerImpl* navigation_controller, |
36 NavigatorDelegate* delegate); | 36 NavigatorDelegate* delegate); |
37 | 37 |
38 // Navigator implementation. | 38 // Navigator implementation. |
39 virtual NavigationController* GetController() OVERRIDE; | 39 virtual NavigationController* GetController() override; |
40 virtual void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host, | 40 virtual void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host, |
41 const GURL& url, | 41 const GURL& url, |
42 bool is_transition_navigation) OVERRIDE; | 42 bool is_transition_navigation) override; |
43 virtual void DidFailProvisionalLoadWithError( | 43 virtual void DidFailProvisionalLoadWithError( |
44 RenderFrameHostImpl* render_frame_host, | 44 RenderFrameHostImpl* render_frame_host, |
45 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) | 45 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) |
46 OVERRIDE; | 46 override; |
47 virtual void DidFailLoadWithError( | 47 virtual void DidFailLoadWithError( |
48 RenderFrameHostImpl* render_frame_host, | 48 RenderFrameHostImpl* render_frame_host, |
49 const GURL& url, | 49 const GURL& url, |
50 int error_code, | 50 int error_code, |
51 const base::string16& error_description) OVERRIDE; | 51 const base::string16& error_description) override; |
52 virtual void DidNavigate( | 52 virtual void DidNavigate( |
53 RenderFrameHostImpl* render_frame_host, | 53 RenderFrameHostImpl* render_frame_host, |
54 const FrameHostMsg_DidCommitProvisionalLoad_Params& | 54 const FrameHostMsg_DidCommitProvisionalLoad_Params& |
55 input_params) OVERRIDE; | 55 input_params) override; |
56 virtual bool NavigateToPendingEntry( | 56 virtual bool NavigateToPendingEntry( |
57 RenderFrameHostImpl* render_frame_host, | 57 RenderFrameHostImpl* render_frame_host, |
58 NavigationController::ReloadType reload_type) OVERRIDE; | 58 NavigationController::ReloadType reload_type) override; |
59 virtual void RequestOpenURL(RenderFrameHostImpl* render_frame_host, | 59 virtual void RequestOpenURL(RenderFrameHostImpl* render_frame_host, |
60 const GURL& url, | 60 const GURL& url, |
61 const Referrer& referrer, | 61 const Referrer& referrer, |
62 WindowOpenDisposition disposition, | 62 WindowOpenDisposition disposition, |
63 bool should_replace_current_entry, | 63 bool should_replace_current_entry, |
64 bool user_gesture) OVERRIDE; | 64 bool user_gesture) override; |
65 virtual void RequestTransferURL( | 65 virtual void RequestTransferURL( |
66 RenderFrameHostImpl* render_frame_host, | 66 RenderFrameHostImpl* render_frame_host, |
67 const GURL& url, | 67 const GURL& url, |
68 const std::vector<GURL>& redirect_chain, | 68 const std::vector<GURL>& redirect_chain, |
69 const Referrer& referrer, | 69 const Referrer& referrer, |
70 ui::PageTransition page_transition, | 70 ui::PageTransition page_transition, |
71 WindowOpenDisposition disposition, | 71 WindowOpenDisposition disposition, |
72 const GlobalRequestID& transferred_global_request_id, | 72 const GlobalRequestID& transferred_global_request_id, |
73 bool should_replace_current_entry, | 73 bool should_replace_current_entry, |
74 bool user_gesture) OVERRIDE; | 74 bool user_gesture) override; |
75 virtual void OnBeginNavigation( | 75 virtual void OnBeginNavigation( |
76 FrameTreeNode* frame_tree_node, | 76 FrameTreeNode* frame_tree_node, |
77 const FrameHostMsg_BeginNavigation_Params& params, | 77 const FrameHostMsg_BeginNavigation_Params& params, |
78 const CommonNavigationParams& common_params) OVERRIDE; | 78 const CommonNavigationParams& common_params) override; |
79 virtual void CommitNavigation( | 79 virtual void CommitNavigation( |
80 FrameTreeNode* frame_tree_node, | 80 FrameTreeNode* frame_tree_node, |
81 const NavigationBeforeCommitInfo& info) OVERRIDE; | 81 const NavigationBeforeCommitInfo& info) override; |
82 virtual void LogResourceRequestTime( | 82 virtual void LogResourceRequestTime( |
83 base::TimeTicks timestamp, const GURL& url) OVERRIDE; | 83 base::TimeTicks timestamp, const GURL& url) override; |
84 virtual void CancelNavigation(FrameTreeNode* frame_tree_node) OVERRIDE; | 84 virtual void CancelNavigation(FrameTreeNode* frame_tree_node) override; |
85 | 85 |
86 private: | 86 private: |
87 friend class NavigatorTest; | 87 friend class NavigatorTest; |
88 virtual ~NavigatorImpl(); | 88 virtual ~NavigatorImpl(); |
89 | 89 |
90 // Navigates to the given entry, which must be the pending entry. Private | 90 // Navigates to the given entry, which must be the pending entry. Private |
91 // because all callers should use NavigateToPendingEntry. | 91 // because all callers should use NavigateToPendingEntry. |
92 bool NavigateToEntry( | 92 bool NavigateToEntry( |
93 RenderFrameHostImpl* render_frame_host, | 93 RenderFrameHostImpl* render_frame_host, |
94 const NavigationEntryImpl& entry, | 94 const NavigationEntryImpl& entry, |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 // different FrameTreeNodes, based on the frame_tree_node_id. | 126 // different FrameTreeNodes, based on the frame_tree_node_id. |
127 typedef base::ScopedPtrHashMap<int64, NavigationRequest> NavigationRequestMap; | 127 typedef base::ScopedPtrHashMap<int64, NavigationRequest> NavigationRequestMap; |
128 NavigationRequestMap navigation_request_map_; | 128 NavigationRequestMap navigation_request_map_; |
129 | 129 |
130 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl); | 130 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl); |
131 }; | 131 }; |
132 | 132 |
133 } // namespace content | 133 } // namespace content |
134 | 134 |
135 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ | 135 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ |
OLD | NEW |