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 "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
| 9 #include "content/public/browser/invalidate_type.h" | 9 #include "content/public/browser/invalidate_type.h" |
| 10 #include "content/public/browser/navigation_controller.h" | 10 #include "content/public/browser/navigation_controller.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 98 virtual WebContents* OpenURL(const OpenURLParams& params) = 0; | 98 virtual WebContents* OpenURL(const OpenURLParams& params) = 0; |
| 99 | 99 |
| 100 // Returns whether to continue a navigation that needs to transfer to a | 100 // Returns whether to continue a navigation that needs to transfer to a |
| 101 // different process between the load start and commit. | 101 // different process between the load start and commit. |
| 102 virtual bool ShouldTransferNavigation(bool is_main_frame_navigation); | 102 virtual bool ShouldTransferNavigation(bool is_main_frame_navigation); |
| 103 | 103 |
| 104 // Returns whether URLs for aborted browser-initiated navigations should be | 104 // Returns whether URLs for aborted browser-initiated navigations should be |
| 105 // preserved in the omnibox. Defaults to false. | 105 // preserved in the omnibox. Defaults to false. |
| 106 virtual bool ShouldPreserveAbortedURLs(); | 106 virtual bool ShouldPreserveAbortedURLs(); |
| 107 | 107 |
| 108 // Returns the overriden user agent string if it's set. | |
| 109 virtual const std::string& GetNavigationUserAgentOverride(); | |
|
nasko
2017/03/13 18:47:12
nit: The "Navigation" part of the name doesn't rea
jam
2017/03/13 19:32:40
yeah I did it this way because WebContents, which
nasko
2017/03/13 20:35:41
We have a few cases where the same pure virtual me
jam
2017/03/13 20:38:25
ah, if there's already precedent with this interfa
| |
| 110 | |
| 108 // A RenderFrameHost in the specified |frame_tree_node| started loading a new | 111 // A RenderFrameHost in the specified |frame_tree_node| started loading a new |
| 109 // document. This correponds to Blink's notion of the throbber starting. | 112 // document. This correponds to Blink's notion of the throbber starting. |
| 110 // |to_different_document| will be true unless the load is a fragment | 113 // |to_different_document| will be true unless the load is a fragment |
| 111 // navigation, or triggered by history.pushState/replaceState. | 114 // navigation, or triggered by history.pushState/replaceState. |
| 112 virtual void DidStartLoading(FrameTreeNode* frame_tree_node, | 115 virtual void DidStartLoading(FrameTreeNode* frame_tree_node, |
| 113 bool to_different_document) {} | 116 bool to_different_document) {} |
| 114 | 117 |
| 115 // A document stopped loading. This corresponds to Blink's notion of the | 118 // A document stopped loading. This corresponds to Blink's notion of the |
| 116 // throbber stopping. | 119 // throbber stopping. |
| 117 virtual void DidStopLoading() {} | 120 virtual void DidStopLoading() {} |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 130 // wants to see passed to the corresponding URLRequest on the IO thread. | 133 // wants to see passed to the corresponding URLRequest on the IO thread. |
| 131 // In the case of a navigation to an interstitial, no call will be made to the | 134 // In the case of a navigation to an interstitial, no call will be made to the |
| 132 // embedder and |nullptr| is returned. | 135 // embedder and |nullptr| is returned. |
| 133 virtual std::unique_ptr<NavigationUIData> GetNavigationUIData( | 136 virtual std::unique_ptr<NavigationUIData> GetNavigationUIData( |
| 134 NavigationHandle* navigation_handle); | 137 NavigationHandle* navigation_handle); |
| 135 }; | 138 }; |
| 136 | 139 |
| 137 } // namspace content | 140 } // namspace content |
| 138 | 141 |
| 139 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_DELEGATE_H_ | 142 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_DELEGATE_H_ |
| OLD | NEW |