Chromium Code Reviews| 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_DELEGATE_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_DELEGATE_H_ |
| 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_DELEGATE_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <vector> | |
| 9 | |
| 8 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| 9 #include "content/public/browser/invalidate_type.h" | 11 #include "content/public/browser/invalidate_type.h" |
| 10 #include "content/public/browser/navigation_controller.h" | 12 #include "content/public/browser/navigation_controller.h" |
| 11 #include "ui/base/page_transition_types.h" | 13 #include "ui/base/page_transition_types.h" |
| 12 #include "ui/base/window_open_disposition.h" | 14 #include "ui/base/window_open_disposition.h" |
| 13 | 15 |
| 14 class GURL; | 16 class GURL; |
| 15 struct FrameHostMsg_DidCommitProvisionalLoad_Params; | 17 struct FrameHostMsg_DidCommitProvisionalLoad_Params; |
| 16 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params; | 18 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params; |
| 17 | 19 |
| 18 namespace content { | 20 namespace content { |
| 19 | 21 |
| 20 class FrameTreeNode; | 22 class FrameTreeNode; |
| 21 class NavigationHandle; | 23 class NavigationHandle; |
| 24 class NavigationThrottle; | |
| 22 class RenderFrameHostImpl; | 25 class RenderFrameHostImpl; |
| 23 struct LoadCommittedDetails; | 26 struct LoadCommittedDetails; |
| 24 struct OpenURLParams; | 27 struct OpenURLParams; |
| 25 | 28 |
| 26 // A delegate API used by Navigator to notify its embedder of navigation | 29 // A delegate API used by Navigator to notify its embedder of navigation |
| 27 // related events. | 30 // related events. |
| 28 class CONTENT_EXPORT NavigatorDelegate { | 31 class CONTENT_EXPORT NavigatorDelegate { |
| 29 public: | 32 public: |
| 30 // Called when a navigation started. The same NavigationHandle will be | 33 // Called when a navigation started. The same NavigationHandle will be |
| 31 // provided for events related to the same navigation. | 34 // provided for events related to the same navigation. |
| 32 virtual void DidStartNavigation(NavigationHandle* navigation_handle) {} | 35 virtual void DidStartNavigation(NavigationHandle* navigation_handle) {} |
| 33 | 36 |
| 34 // Called when a navigation was redirected. | 37 // Called when a navigation was redirected. |
| 35 virtual void DidRedirectNavigation(NavigationHandle* navigation_handle) {} | 38 virtual void DidRedirectNavigation(NavigationHandle* navigation_handle) {} |
| 36 | 39 |
| 37 // Called when a navigation committed. | 40 // Called when a navigation committed. |
| 38 virtual void DidCommitNavigation(NavigationHandle* navigation_handle) {} | 41 virtual void DidCommitNavigation(NavigationHandle* navigation_handle) {} |
| 39 | 42 |
| 40 // Called when a document load resulting from the navigation stopped. Note | 43 // Called when a document load resulting from the navigation stopped. Note |
| 41 // that |navigation_handle| will be destroyed at the end of this call. | 44 // that |navigation_handle| will be destroyed at the end of this call. |
| 42 virtual void DidFinishNavigation(NavigationHandle* navigation_handle) {} | 45 virtual void DidFinishNavigation(NavigationHandle* navigation_handle) {} |
| 43 | 46 |
| 47 // Called when the network request is about to start to register the | |
| 48 // NavigationThrottles for the navigation. | |
| 49 virtual std::vector<NavigationThrottle*> AddNavigationThrottles( | |
|
nasko
2015/09/04 23:36:49
As I commented elsewhere, GetNavigationThrottles,
clamy
2015/09/08 16:27:18
This method no longer necessary, as the WebContent
| |
| 50 NavigationHandle* navigation_handle); | |
| 51 | |
| 44 // TODO(clamy): all methods below that are related to navigation | 52 // TODO(clamy): all methods below that are related to navigation |
| 45 // events should go away in favor of the ones above. | 53 // events should go away in favor of the ones above. |
| 46 | 54 |
| 47 // The RenderFrameHost started a provisional load for the frame | 55 // The RenderFrameHost started a provisional load for the frame |
| 48 // represented by |render_frame_host|. | 56 // represented by |render_frame_host|. |
| 49 virtual void DidStartProvisionalLoad( | 57 virtual void DidStartProvisionalLoad( |
| 50 RenderFrameHostImpl* render_frame_host, | 58 RenderFrameHostImpl* render_frame_host, |
| 51 const GURL& validated_url, | 59 const GURL& validated_url, |
| 52 bool is_error_page, | 60 bool is_error_page, |
| 53 bool is_iframe_srcdoc) {} | 61 bool is_iframe_srcdoc) {} |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 127 // throbber stopping. | 135 // throbber stopping. |
| 128 virtual void DidStopLoading() {} | 136 virtual void DidStopLoading() {} |
| 129 | 137 |
| 130 // The load progress was changed. | 138 // The load progress was changed. |
| 131 virtual void DidChangeLoadProgress() {} | 139 virtual void DidChangeLoadProgress() {} |
| 132 }; | 140 }; |
| 133 | 141 |
| 134 } // namspace content | 142 } // namspace content |
| 135 | 143 |
| 136 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_DELEGATE_H_ | 144 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_DELEGATE_H_ |
| OLD | NEW |