[Webkit-unassigned] [Bug 83959] [chromium] Add ability to override user agent string per-WebFrameClient

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 26 17:18:06 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=83959





--- Comment #7 from dfalcantara at chromium.org  2012-04-26 17:18:05 PST ---
(In reply to comment #5)
> Can you provide more context on how this will be used?  We already have hooks for overriding the user agent for site compat (see webkit/glue/webkit_glue.cc) and the web inspector also has the ability to override the user agent.  Maybe one of those methods would work for you?

We need this for "Request desktop site" on Chrome for Android as we upstream our changes.  The feature calls for a per-NavigationEntry user agent override that can be toggled on and off on the fly.  Adding this hook allows us to override it in RenderViewImpl, which communicates with the WebContents about what user agent should be used as navigations are performed.

* A global override won't work because of the way the RenderViews can share the same WebKit instance.  Moreover, the call in webkit_glue.cc takes in only a URL, so having the same URL loaded in two different tabs would always need to share the same user agent.
* It seemed odd to add an inspector to do this, so I didn't explore this route too deeply.

There's a WIP internal doc describing the bigger picture on what we had to do; the link is on an email thread you're CCed on with me and Dirk ("Desktop user agents, redux").

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list