Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(475)

Side by Side Diff: content/browser/frame_host/navigator_delegate.h

Issue 2746043003: Fix user agent overridding with PlzNavigate. (Closed)
Patch Set: without PlzNavigate Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_request.cc ('k') | content/browser/frame_host/navigator_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698