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

Unified Diff: components/guest_view/browser/guest_view_base.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: 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 | « components/guest_view.gypi ('k') | components/guest_view/browser/guest_view_message_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/guest_view/browser/guest_view_base.cc
diff --git a/components/guest_view/browser/guest_view_base.cc b/components/guest_view/browser/guest_view_base.cc
index 0f272a370056268400b9db57b0878386addc6e51..cb2890a9fe7c204fe6958a5c65b93048a4c6d698 100644
--- a/components/guest_view/browser/guest_view_base.cc
+++ b/components/guest_view/browser/guest_view_base.cc
@@ -4,6 +4,7 @@
#include "components/guest_view/browser/guest_view_base.h"
+#include "base/command_line.h"
#include "base/lazy_instance.h"
#include "base/strings/utf_string_conversions.h"
#include "components/guest_view/browser/guest_view_event.h"
@@ -18,6 +19,7 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/common/content_switches.h"
#include "content/public/common/page_zoom.h"
#include "content/public/common/url_constants.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
@@ -565,6 +567,14 @@ void GuestViewBase::DidNavigateMainFrame(
const content::FrameNavigateParams& params) {
if (attached() && ZoomPropagatesFromEmbedderToGuest())
SetGuestZoomLevelToMatchEmbedder();
+
+ // TODO(lazyboy): This breaks guest visibility in --site-per-process because
+ // we do not take the widget's visibility into account. We need to also
+ // stay hidden during "visibility:none" state.
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kSitePerProcess)) {
+ web_contents()->WasShown();
+ }
}
void GuestViewBase::ActivateContents(WebContents* web_contents) {
« no previous file with comments | « components/guest_view.gypi ('k') | components/guest_view/browser/guest_view_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698