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

Unified Diff: content/public/browser/guest_mode.cc

Issue 2165523004: Force MimeHandlerView to always use BrowserPlugin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Two quick fixes (One outstanding from lfg@'s comments) Created 4 years, 3 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: content/public/browser/guest_mode.cc
diff --git a/content/public/browser/guest_mode.cc b/content/public/browser/guest_mode.cc
new file mode 100644
index 0000000000000000000000000000000000000000..2e10548a8017a423485c63018f6450b817b2f68d
--- /dev/null
+++ b/content/public/browser/guest_mode.cc
@@ -0,0 +1,26 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/public/browser/guest_mode.h"
+
+#include "content/browser/browser_plugin/browser_plugin_guest.h"
+#include "content/browser/web_contents/web_contents_impl.h"
+#include "content/public/browser/web_contents.h"
+#include "content/public/common/browser_plugin_guest_mode.h"
+
+namespace content {
+
+namespace guest_mode {
+
+bool IsCrossProcessFrameGuest(WebContents* web_contents) {
+ if (!BrowserPluginGuestMode::UseCrossProcessFramesForGuests())
+ return false;
+ BrowserPluginGuest* browser_plugin_guest =
+ static_cast<WebContentsImpl*>(web_contents)->GetBrowserPluginGuest();
+ return browser_plugin_guest &&
+ !browser_plugin_guest->is_mime_handler_view_guest();
+}
+
+} // namespace guest_mode
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698