| Index: chrome/browser/plugins/plugin_info_message_filter.cc
|
| diff --git a/chrome/browser/plugins/plugin_info_message_filter.cc b/chrome/browser/plugins/plugin_info_message_filter.cc
|
| index f2260e43fb3c3949d8472ee8f129d5d37e302e48..9a15415a236673d54e8491f1d6d93d6fc9b35be0 100644
|
| --- a/chrome/browser/plugins/plugin_info_message_filter.cc
|
| +++ b/chrome/browser/plugins/plugin_info_message_filter.cc
|
| @@ -97,6 +97,9 @@ bool PluginInfoMessageFilter::OnMessageReceived(const IPC::Message& message,
|
| IPC_BEGIN_MESSAGE_MAP_EX(PluginInfoMessageFilter, message, *message_was_ok)
|
| IPC_MESSAGE_HANDLER_DELAY_REPLY(ChromeViewHostMsg_GetPluginInfo,
|
| OnGetPluginInfo)
|
| + IPC_MESSAGE_HANDLER(
|
| + ChromeViewHostMsg_IsInternalPluginRegisteredForMimeType,
|
| + OnIsInternalPluginRegisteredForMimeType)
|
| IPC_MESSAGE_UNHANDLED(return false)
|
| IPC_END_MESSAGE_MAP()
|
| return true;
|
| @@ -164,6 +167,25 @@ void PluginInfoMessageFilter::PluginsLoaded(
|
| Send(reply_msg);
|
| }
|
|
|
| +void PluginInfoMessageFilter::OnIsInternalPluginRegisteredForMimeType(
|
| + const std::string& mime_type,
|
| + bool* is_registered) {
|
| + std::vector<WebPluginInfo> plugins;
|
| + PluginService::GetInstance()->GetInternalPlugins(&plugins);
|
| + for (size_t i = 0; i < plugins.size(); ++i) {
|
| + const std::vector<content::WebPluginMimeType>& mime_types =
|
| + plugins[i].mime_types;
|
| + for (size_t j = 0; j < mime_types.size(); ++j) {
|
| + if (mime_types[j].mime_type == mime_type) {
|
| + *is_registered = true;
|
| + return;
|
| + }
|
| + }
|
| + }
|
| +
|
| + *is_registered = false;
|
| +}
|
| +
|
| void PluginInfoMessageFilter::Context::DecidePluginStatus(
|
| const GetPluginInfo_Params& params,
|
| const WebPluginInfo& plugin,
|
|
|