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

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

Issue 1202523004: Make WebViewGuest::LoadURLWithParams also take a GlobalRequestID param. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: SYNC 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
« no previous file with comments | « extensions/browser/guest_view/web_view/web_view_guest.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6d7a4c23c6d7f5d4881eabd9d64078b0a897ce5a..f2d9aa5c136b55725f5197bf2b9f055b73498a4f 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;
@@ -998,14 +999,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(
@@ -1267,6 +1268,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();
}
@@ -1322,10 +1324,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://.
@@ -1354,6 +1358,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;
« no previous file with comments | « extensions/browser/guest_view/web_view/web_view_guest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698