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 201e08108e395fef62f7aa205fbb4cb6907a7c12..2b2f0a00f778f8b4cd3e91fcd7afa33149bb11ad 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" |
@@ -558,6 +560,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. |
Fady Samuel
2015/06/11 22:27:21
Does OOPIF have visibility implemented yet?
|
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kSitePerProcess)) { |
+ web_contents()->WasShown(); |
+ } |
} |
void GuestViewBase::ActivateContents(WebContents* web_contents) { |