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 |
Charlie Reis
2015/06/18 00:13:18
Be sure to keep track of these TODOs for followup
lazyboy
2015/06/18 22:45:12
OK. I'm tracking them on the shared doc.
|
+ // 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) { |