summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'extensions')
-rw-r--r--extensions/browser/guest_view/web_view/web_view_guest.cc23
-rw-r--r--extensions/browser/guest_view/web_view/web_view_guest.h14
2 files changed, 24 insertions, 13 deletions
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 6d7a4c2..f2d9aa5 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;
diff --git a/extensions/browser/guest_view/web_view/web_view_guest.h b/extensions/browser/guest_view/web_view/web_view_guest.h
index ea7b4f6..e75b2c1 100644
--- a/extensions/browser/guest_view/web_view/web_view_guest.h
+++ b/extensions/browser/guest_view/web_view/web_view_guest.h
@@ -23,6 +23,10 @@ namespace blink {
struct WebFindOptions;
} // nanespace blink
+namespace content {
+struct GlobalRequestID;
+} // namespace content
+
namespace extensions {
class WebViewInternalFindFunction;
@@ -317,10 +321,12 @@ class WebViewGuest : public guest_view::GuestView<WebViewGuest>,
// Loads the |url| provided. |force_navigation| indicates whether to reload
// the content if the provided |url| matches the current page of the guest.
- void LoadURLWithParams(const GURL& url,
- const content::Referrer& referrer,
- ui::PageTransition transition_type,
- bool force_navigation);
+ void LoadURLWithParams(
+ const GURL& url,
+ const content::Referrer& referrer,
+ ui::PageTransition transition_type,
+ const content::GlobalRequestID& transferred_global_request_id,
+ bool force_navigation);
void RequestNewWindowPermission(
WindowOpenDisposition disposition,