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

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: Revert unused changes from previous attempt + more cleanup. Created 5 years, 10 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 fce1b6d0dd7301210ed877a2f3b7f2794649e4fe..a064d23706af1bbb62d2f38c4d0ea2d80a5b4366 100644
--- a/extensions/browser/guest_view/web_view/web_view_guest.cc
+++ b/extensions/browser/guest_view/web_view/web_view_guest.cc
@@ -294,12 +294,13 @@ void WebViewGuest::DidInitialize(const base::DictionaryValue& create_params) {
owner_web_contents()->GetRenderProcessHost()->GetID(),
view_instance_id());
- // We must install the mapping from guests to WebViews prior to resuming
- // suspended resource loads so that the WebRequest API will catch resource
- // requests.
- PushWebViewStateToIOThread();
+ // NOTE: Calling this prior to attachment breaks OOPIF <webview>.
+ //// We must install the mapping from guests to WebViews prior to resuming
+ //// suspended resource loads so that the WebRequest API will catch resource
+ //// requests.
+ //PushWebViewStateToIOThread();
Fady Samuel 2015/03/04 20:44:47 This makes me sad.
lazyboy 2015/04/01 21:47:58 These changes here are temporary, I'll fix these o
- ApplyAttributes(create_params);
+ //ApplyAttributes(create_params);
}
void WebViewGuest::AttachWebViewHelpers(WebContents* contents) {
@@ -476,7 +477,7 @@ void WebViewGuest::OnFrameNameChanged(bool is_top_level,
if (name_ == name)
return;
- ReportFrameNameChange(name);
+ //ReportFrameNameChange(name);
Fady Samuel 2015/03/04 20:44:47 This makes me sad.
}
void WebViewGuest::CreateNewGuestWebViewWindow(
@@ -860,7 +861,7 @@ void WebViewGuest::WillAttachToEmbedder() {
// We must install the mapping from guests to WebViews prior to resuming
// suspended resource loads so that the WebRequest API will catch resource
// requests.
- PushWebViewStateToIOThread();
+ //PushWebViewStateToIOThread();
Fady Samuel 2015/03/04 20:44:47 This makes me sad.
}
content::JavaScriptDialogManager* WebViewGuest::GetJavaScriptDialogManager(
@@ -898,6 +899,7 @@ void WebViewGuest::NavigateGuest(const std::string& src,
// normal web URLs are supported. No protocol handlers are installed for
// other schemes (e.g., WebUI or extensions), and no permissions or bindings
// can be granted to the guest process.
+ printf("Calling LoadURLWithParams\n");
LoadURLWithParams(validated_url,
content::Referrer(),
ui::PAGE_TRANSITION_AUTO_TOPLEVEL,
@@ -959,8 +961,8 @@ void WebViewGuest::ApplyAttributes(const base::DictionaryValue& params) {
if (name_.empty())
SetName(name);
}
- if (attached())
- ReportFrameNameChange(name_);
+ //if (attached())
+ // ReportFrameNameChange(name_);
std::string user_agent_override;
params.GetString(webview::kParameterUserAgentOverride, &user_agent_override);
@@ -1123,6 +1125,22 @@ content::WebContents* WebViewGuest::OpenURLFromTab(
// state that assumes an embedder exists, such as RenderWidgetHostViewGuest.
// Navigation also resumes resource loading which we don't want to allow
// until attachment.
+ // site-per-process
+ printf("source: [%p], web_contents(): [%p]\n", source, web_contents());
Fady Samuel 2015/03/04 20:44:47 This basically breaks the new window API. Why is t
+ printf("web_contents(): [%p]\n", web_contents());
+ //CHECK(0);
+ content::NavigationController::LoadURLParams load_url_params(
+ params.url);
+ load_url_params.referrer = params.referrer;
+ load_url_params.transition_type = params.transition;
+ load_url_params.extra_headers = std::string();
+ //load_url_params.frame_tree_node_id = params.frame_tree_node_id;
+ load_url_params.transferred_global_request_id =
+ params.transferred_global_request_id;
+ source->GetController().LoadURLWithParams(load_url_params);
+ return source;
+
+ // Note: IGNORED.
if (!attached()) {
WebViewGuest* opener = GetOpener();
auto it = opener->pending_new_windows_.find(this);

Powered by Google App Engine
This is Rietveld 408576698