summaryrefslogtreecommitdiffstats
path: root/content/browser/web_contents/navigation_controller_impl.h
diff options
context:
space:
mode:
authordfalcantara@chromium.org <dfalcantara@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-20 22:32:22 +0000
committerdfalcantara@chromium.org <dfalcantara@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-20 22:32:22 +0000
commitbf70edce9937b8e22454d687351db8cc456ba518 (patch)
treee4f35048094aa3f07162b8602ad3c28b0ff01285 /content/browser/web_contents/navigation_controller_impl.h
parentf59a805a41a6cb660bec99b266630ffe38987139 (diff)
downloadchromium_src-bf70edce9937b8e22454d687351db8cc456ba518.zip
chromium_src-bf70edce9937b8e22454d687351db8cc456ba518.tar.gz
chromium_src-bf70edce9937b8e22454d687351db8cc456ba518.tar.bz2
Transfer user agent info between browser and renderer
Upstreaming "Request desktop site" feature from Android. Previous CLs: * http://codereview.chromium.org/9999010/ Stores the original request URL in NavigationEntry * http://codereview.chromium.org/10170016/ Adds info about user agent overrides to WebContents and NavigationEntries * https://bugs.webkit.org/show_bug.cgi?id=83959 Adds ability to override the user agent string per-WebFrameClient The previous CLs added the framework to the browser and renderer to support overriding the default user agent with a different string. This CL connects the two sides, letting the browser pass information about the user agent override the renderer should be using for a given navigation. There's a slightly out of date doc at http://go/chrome_android_rds that's being adjusted as CLs land. Changes from previous CLs: * The user agent override string is now stored in the RendererPreferences instead of directly inside the RenderViewImpl and WebContentsImpl. * Setting the user agent override for a WebContents forces a reload if a page is currently being loaded to avoid giving different parts of a web page different user agents. Additions: * The browser-side lets the renderer know about the user agent override string through an IPC call that occurs when the user agent is set in WebContentsImpl and when a RenderViewImpl is created. * Instant + Prefetch classes have been adjusted to set carry over the override flags from the WebContents they're being used for. * A new function is added to the NavigationController to allow setting the override flag for a particular NavigationEntry before it is loaded. * The NavigationController is alerted to new navigations by the renderer with an IPC call and saves the override state in the relevant NavigationEntry. * DocumentState stores whether the user agent override was used for a given navigation, and is set in RenderViewImpl::didCreateDataSource(). Both browser- and renderer-initiated navigations go through here, with browser-initiated navigations using a ViewMsg_Navigate_Params. * WebFrameClient::userAgentOverride() is overridden by RenderViewImpl to return the user agent for the current main frame. If the main frame is provisionally loading something, we use the override for the provisional load instead. Internal bugs=6272286,6213026 BUG=112923 TEST= Review URL: https://chromiumcodereview.appspot.com/10450002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143279 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/web_contents/navigation_controller_impl.h')
-rw-r--r--content/browser/web_contents/navigation_controller_impl.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/content/browser/web_contents/navigation_controller_impl.h b/content/browser/web_contents/navigation_controller_impl.h
index dfe4dd6..5053475 100644
--- a/content/browser/web_contents/navigation_controller_impl.h
+++ b/content/browser/web_contents/navigation_controller_impl.h
@@ -63,6 +63,13 @@ class CONTENT_EXPORT NavigationControllerImpl
const content::Referrer& referrer,
content::PageTransition type,
const std::string& extra_headers) OVERRIDE;
+ virtual void LoadURLWithUserAgentOverride(
+ const GURL& url,
+ const content::Referrer& referrer,
+ content::PageTransition type,
+ bool is_renderer_initiated,
+ const std::string& extra_headers,
+ bool is_overriding_user_agent) OVERRIDE;
virtual void TransferURL(
const GURL& url,
const content::Referrer& referrer,