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

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

Issue 9609008: Implemented Browser Plugin (NOT FOR REVIEW) (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Merged with Tip-of-Tree Created 8 years, 9 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
« no previous file with comments | « no previous file | content/browser/guest_render_view_host_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/plugin_info_message_filter.cc
diff --git a/chrome/browser/renderer_host/plugin_info_message_filter.cc b/chrome/browser/renderer_host/plugin_info_message_filter.cc
index 9017c6b2d45a12c3434fe6fe8758e2f79d20bfae..0a2d05aa39da2e12b3f1f0e51ae7b7c0a992ab0a 100644
--- a/chrome/browser/renderer_host/plugin_info_message_filter.cc
+++ b/chrome/browser/renderer_host/plugin_info_message_filter.cc
@@ -20,6 +20,7 @@
#include "googleurl/src/gurl.h"
#include "webkit/plugins/npapi/plugin_group.h"
#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/plugins/plugin_constants.h"
#if defined(OS_WIN)
// These includes are only necessary for the PluginInfobarExperiment.
@@ -130,6 +131,20 @@ void PluginInfoMessageFilter::OnGetPluginInfo(
top_origin_url,
mime_type
};
+ // The browser gives a canned response regarding the browser plugin
+ // mime type.
+ bool needs_browser_plugin =
+ mime_type == kBrowserPluginMimeType;
+ if (needs_browser_plugin) {
+ webkit::WebPluginInfo plugin(
+ ASCIIToUTF16(kBrowserPluginName),
+ FilePath(kBrowserPluginPath), string16(),
+ ASCIIToUTF16(kBrowserPluginDescription));
+ ChromeViewHostMsg_GetPluginInfo::WriteReplyParams(
+ reply_msg, ChromeViewHostMsg_GetPluginInfo_Status(), plugin, mime_type);
+ Send(reply_msg);
+ return;
+ }
PluginService::GetInstance()->GetPlugins(
base::Bind(&PluginInfoMessageFilter::PluginsLoaded,
weak_ptr_factory_.GetWeakPtr(),
« no previous file with comments | « no previous file | content/browser/guest_render_view_host_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698