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

Unified Diff: extensions/browser/guest_view/web_view/web_view_guest.cc

Issue 972313002: Make <webview> use out-of-process iframe architecture. (Closed) Base URL: ssh://saopaulo.wat/mnt/dev/shared/src@testoopif2z-better-chrome
Patch Set: Rebase after swapped out changes major rework with RFP Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: extensions/browser/guest_view/web_view/web_view_guest.cc
diff --git a/extensions/browser/guest_view/web_view/web_view_guest.cc b/extensions/browser/guest_view/web_view/web_view_guest.cc
index 71dac535b1e7be056b944d5f436c7cf91f52fce5..618853547d32d1d433876be769f4d8a0c1baf82d 100644
--- a/extensions/browser/guest_view/web_view/web_view_guest.cc
+++ b/extensions/browser/guest_view/web_view/web_view_guest.cc
@@ -55,6 +55,7 @@
#include "url/url_constants.h"
using base::UserMetricsAction;
+using content::GlobalRequestID;
using content::RenderFrameHost;
using content::ResourceType;
using content::StoragePartition;
@@ -983,14 +984,14 @@ void WebViewGuest::NavigateGuest(const std::string& src,
// if the navigation is embedder-initiated. For browser-initiated navigations,
// content scripts will be ready.
if (force_navigation) {
- SignalWhenReady(
- base::Bind(&WebViewGuest::LoadURLWithParams,
- weak_ptr_factory_.GetWeakPtr(), url, content::Referrer(),
- ui::PAGE_TRANSITION_AUTO_TOPLEVEL, force_navigation));
+ SignalWhenReady(base::Bind(
+ &WebViewGuest::LoadURLWithParams, weak_ptr_factory_.GetWeakPtr(), url,
+ content::Referrer(), ui::PAGE_TRANSITION_AUTO_TOPLEVEL,
+ GlobalRequestID(), force_navigation));
return;
}
LoadURLWithParams(url, content::Referrer(), ui::PAGE_TRANSITION_AUTO_TOPLEVEL,
- force_navigation);
+ GlobalRequestID(), force_navigation);
}
bool WebViewGuest::HandleKeyboardShortcuts(
@@ -1252,6 +1253,7 @@ content::WebContents* WebViewGuest::OpenURLFromTab(
// about:blank.
if (params.disposition == CURRENT_TAB) {
LoadURLWithParams(params.url, params.referrer, params.transition,
+ params.transferred_global_request_id,
true /* force_navigation */);
return web_contents();
}
@@ -1307,10 +1309,12 @@ bool WebViewGuest::IsFullscreenForTabOrPending(
return is_guest_fullscreen_;
}
-void WebViewGuest::LoadURLWithParams(const GURL& url,
- const content::Referrer& referrer,
- ui::PageTransition transition_type,
- bool force_navigation) {
+void WebViewGuest::LoadURLWithParams(
+ const GURL& url,
+ const content::Referrer& referrer,
+ ui::PageTransition transition_type,
+ const GlobalRequestID& transferred_global_request_id,
+ bool force_navigation) {
// Do not allow navigating a guest to schemes other than known safe schemes.
// This will block the embedder trying to load unwanted schemes, e.g.
// chrome://.
@@ -1339,6 +1343,7 @@ void WebViewGuest::LoadURLWithParams(const GURL& url,
load_url_params.referrer = referrer;
load_url_params.transition_type = transition_type;
load_url_params.extra_headers = std::string();
+ load_url_params.transferred_global_request_id = transferred_global_request_id;
if (is_overriding_user_agent_) {
load_url_params.override_user_agent =
content::NavigationController::UA_OVERRIDE_TRUE;

Powered by Google App Engine
This is Rietveld 408576698