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

Unified Diff: chrome/browser/plugins/plugin_info_message_filter.cc

Issue 107183002: Move more of the plugin code in the renderer to use RenderFrame instead of RenderView. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments Created 7 years 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: chrome/browser/plugins/plugin_info_message_filter.cc
===================================================================
--- chrome/browser/plugins/plugin_info_message_filter.cc (revision 238847)
+++ chrome/browser/plugins/plugin_info_message_filter.cc (working copy)
@@ -119,20 +119,20 @@
PluginInfoMessageFilter::~PluginInfoMessageFilter() {}
struct PluginInfoMessageFilter::GetPluginInfo_Params {
- int render_view_id;
+ int render_frame_id;
GURL url;
GURL top_origin_url;
std::string mime_type;
};
void PluginInfoMessageFilter::OnGetPluginInfo(
- int render_view_id,
+ int render_frame_id,
const GURL& url,
const GURL& top_origin_url,
const std::string& mime_type,
IPC::Message* reply_msg) {
GetPluginInfo_Params params = {
- render_view_id,
+ render_frame_id,
url,
top_origin_url,
mime_type
@@ -150,7 +150,7 @@
ChromeViewHostMsg_GetPluginInfo_Output output;
// This also fills in |actual_mime_type|.
scoped_ptr<PluginMetadata> plugin_metadata;
- if (context_.FindEnabledPlugin(params.render_view_id, params.url,
+ if (context_.FindEnabledPlugin(params.render_frame_id, params.url,
params.top_origin_url, params.mime_type,
&output.status, &output.plugin,
&output.actual_mime_type,
@@ -209,9 +209,8 @@
if (plugin.type == WebPluginInfo::PLUGIN_TYPE_NPAPI) {
CHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
// NPAPI plugins are not supported inside <webview> guests.
- ExtensionRendererState::WebViewInfo info;
- if (ExtensionRendererState::GetInstance()->GetWebViewInfo(
- render_process_id_, params.render_view_id, &info)) {
+ if (ExtensionRendererState::GetInstance()->IsWebViewRenderer(
+ render_process_id_)) {
status->value =
ChromeViewHostMsg_GetPluginInfo_Status::kNPAPINotSupported;
return;
@@ -283,17 +282,15 @@
// the guest. In order to do this, set the status to 'Unauthorized' here,
// and update the status as appropriate depending on the response from the
// embedder.
- ExtensionRendererState::WebViewInfo info;
- if (ExtensionRendererState::GetInstance()->GetWebViewInfo(
- render_process_id_, params.render_view_id, &info)) {
- status->value =
- ChromeViewHostMsg_GetPluginInfo_Status::kUnauthorized;
+ if (ExtensionRendererState::GetInstance()->IsWebViewRenderer(
+ render_process_id_)) {
+ status->value = ChromeViewHostMsg_GetPluginInfo_Status::kUnauthorized;
}
}
}
bool PluginInfoMessageFilter::Context::FindEnabledPlugin(
- int render_view_id,
+ int render_frame_id,
const GURL& url,
const GURL& top_origin_url,
const std::string& mime_type,
@@ -316,7 +313,7 @@
size_t i = 0;
for (; i < matching_plugins.size(); ++i) {
if (!filter || filter->IsPluginAvailable(render_process_id_,
- render_view_id,
+ render_frame_id,
resource_context_,
url,
top_origin_url,
« no previous file with comments | « chrome/browser/plugins/plugin_info_message_filter.h ('k') | chrome/browser/printing/print_preview_dialog_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698