| 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 7a5f4f2dada3c527fbafb8038960f730d785daed..ebcc476974f629de55f9762f510e55914450e8e7 100644
|
| --- a/extensions/browser/guest_view/web_view/web_view_guest.cc
|
| +++ b/extensions/browser/guest_view/web_view/web_view_guest.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "extensions/browser/guest_view/web_view/web_view_guest.h"
|
|
|
| +#include "base/command_line.h"
|
| #include "base/message_loop/message_loop.h"
|
| #include "base/strings/stringprintf.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| @@ -30,6 +31,7 @@
|
| #include "content/public/browser/user_metrics.h"
|
| #include "content/public/browser/web_contents.h"
|
| #include "content/public/browser/web_contents_delegate.h"
|
| +#include "content/public/common/content_switches.h"
|
| #include "content/public/common/media_stream_request.h"
|
| #include "content/public/common/page_zoom.h"
|
| #include "content/public/common/result_codes.h"
|
| @@ -55,6 +57,7 @@
|
| #include "url/url_constants.h"
|
|
|
| using base::UserMetricsAction;
|
| +using content::GlobalRequestID;
|
| using content::RenderFrameHost;
|
| using content::ResourceType;
|
| using content::StoragePartition;
|
| @@ -977,14 +980,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(
|
| @@ -1246,6 +1249,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();
|
| }
|
| @@ -1301,10 +1305,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://.
|
| @@ -1333,6 +1339,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;
|
|
|