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

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

Issue 2165523004: Force MimeHandlerView to always use BrowserPlugin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added BrowserPluginGuestDelegateMode::DelegateMode(FromWebContents)? Created 4 years, 5 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/browser_plugin_guest_delegate_mode.cc
diff --git a/content/public/browser/browser_plugin_guest_delegate_mode.cc b/content/public/browser/browser_plugin_guest_delegate_mode.cc
new file mode 100644
index 0000000000000000000000000000000000000000..09bff73fbb954627a4025e66bd437dcdc7a4e573
--- /dev/null
+++ b/content/public/browser/browser_plugin_guest_delegate_mode.cc
@@ -0,0 +1,24 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
lfg 2016/07/30 00:05:25 2016
EhsanK 2016/09/01 21:19:07 Done.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/public/browser/browser_plugin_guest_delegate_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 {
+
+// static
+BrowserPluginGuestDelegateMode::DelegateMode
+BrowserPluginGuestDelegateMode::DelegateModeFromWebContents(
+ content::WebContents* web_contents) {
+ BrowserPluginGuest* guest =
+ static_cast<WebContentsImpl*>(web_contents)->GetBrowserPluginGuest();
+
+ return !!guest ? guest->delegate_mode() : DelegateMode::NONE;
+}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698