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

Unified Diff: content/browser/browser_plugin/browser_plugin_guest.cc

Issue 291403002: Remove some RenderProcessHost::IsGuest call sites (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Android build Created 6 years, 7 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/browser/browser_plugin/browser_plugin_guest.cc
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
index 0eebca783f0dc31122a20ac916e1fd3de55979fa..3842a85744a04ccbd6285abd903399d9b67064ab 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
@@ -331,6 +331,18 @@ BrowserPluginGuest* BrowserPluginGuest::Create(
return guest;
}
+// static
+bool BrowserPluginGuest::IsGuest(WebContentsImpl* web_contents) {
+ return web_contents && web_contents->GetBrowserPluginGuest();
+}
+
+// static
+bool BrowserPluginGuest::IsGuest(RenderViewHostImpl* render_view_host) {
+ return render_view_host && IsGuest(
+ static_cast<WebContentsImpl*>(WebContents::FromRenderViewHost(
+ render_view_host)));
+}
+
RenderWidgetHostView* BrowserPluginGuest::GetEmbedderRenderWidgetHostView() {
if (!attached())
return NULL;
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_guest.h ('k') | content/browser/browser_plugin/browser_plugin_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698