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

Side by Side Diff: chrome/browser/plugins/plugin_observer.cc

Issue 1063413002: Receive all messages in PluginObserver from the RenderFrameHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: update base Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/plugins/plugin_observer.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/plugins/plugin_observer.h" 5 #include "chrome/browser/plugins/plugin_observer.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/debug/crash_logging.h" 9 #include "base/debug/crash_logging.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 &web_contents()->GetController(), 329 &web_contents()->GetController(),
330 infobar_text); 330 infobar_text);
331 } 331 }
332 332
333 bool PluginObserver::OnMessageReceived( 333 bool PluginObserver::OnMessageReceived(
334 const IPC::Message& message, 334 const IPC::Message& message,
335 content::RenderFrameHost* render_frame_host) { 335 content::RenderFrameHost* render_frame_host) {
336 IPC_BEGIN_MESSAGE_MAP(PluginObserver, message) 336 IPC_BEGIN_MESSAGE_MAP(PluginObserver, message)
337 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_BlockedOutdatedPlugin, 337 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_BlockedOutdatedPlugin,
338 OnBlockedOutdatedPlugin) 338 OnBlockedOutdatedPlugin)
339 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_NPAPINotSupported,
340 OnNPAPINotSupported)
341
342 IPC_MESSAGE_UNHANDLED(return false)
343 IPC_END_MESSAGE_MAP()
344
345 return true;
346 }
347
348 bool PluginObserver::OnMessageReceived(const IPC::Message& message) {
349 IPC_BEGIN_MESSAGE_MAP(PluginObserver, message)
350 #if defined(ENABLE_PLUGIN_INSTALLATION) 339 #if defined(ENABLE_PLUGIN_INSTALLATION)
351 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_RemovePluginPlaceholderHost, 340 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_RemovePluginPlaceholderHost,
352 OnRemovePluginPlaceholderHost) 341 OnRemovePluginPlaceholderHost)
353 #endif 342 #endif
354 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_OpenAboutPlugins, 343 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_OpenAboutPlugins,
355 OnOpenAboutPlugins) 344 OnOpenAboutPlugins)
356 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_CouldNotLoadPlugin, 345 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_CouldNotLoadPlugin,
357 OnCouldNotLoadPlugin) 346 OnCouldNotLoadPlugin)
347 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_NPAPINotSupported,
348 OnNPAPINotSupported)
358 349
359 IPC_MESSAGE_UNHANDLED(return false) 350 IPC_MESSAGE_UNHANDLED(return false)
360 IPC_END_MESSAGE_MAP() 351 IPC_END_MESSAGE_MAP()
361 352
362 return true; 353 return true;
363 } 354 }
364 355
365 void PluginObserver::OnBlockedOutdatedPlugin(int placeholder_id, 356 void PluginObserver::OnBlockedOutdatedPlugin(int placeholder_id,
366 const std::string& identifier) { 357 const std::string& identifier) {
367 #if defined(ENABLE_PLUGIN_INSTALLATION) 358 #if defined(ENABLE_PLUGIN_INSTALLATION)
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 scoped_ptr<PluginMetadata> plugin; 433 scoped_ptr<PluginMetadata> plugin;
443 bool ret = PluginFinder::GetInstance()->FindPluginWithIdentifier( 434 bool ret = PluginFinder::GetInstance()->FindPluginWithIdentifier(
444 identifier, NULL, &plugin); 435 identifier, NULL, &plugin);
445 DCHECK(ret); 436 DCHECK(ret);
446 437
447 PluginMetroModeInfoBarDelegate::Create( 438 PluginMetroModeInfoBarDelegate::Create(
448 InfoBarService::FromWebContents(web_contents()), 439 InfoBarService::FromWebContents(web_contents()),
449 PluginMetroModeInfoBarDelegate::DESKTOP_MODE_REQUIRED, plugin->name()); 440 PluginMetroModeInfoBarDelegate::DESKTOP_MODE_REQUIRED, plugin->name());
450 #endif 441 #endif
451 } 442 }
OLDNEW
« no previous file with comments | « chrome/browser/plugins/plugin_observer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698