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

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

Issue 1584573004: Remove Metro pinning, and relaunch menu items and strings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 11 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
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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_BlockedOutdatedPlugin, 353 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_BlockedOutdatedPlugin,
354 OnBlockedOutdatedPlugin) 354 OnBlockedOutdatedPlugin)
355 #if defined(ENABLE_PLUGIN_INSTALLATION) 355 #if defined(ENABLE_PLUGIN_INSTALLATION)
356 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_RemovePluginPlaceholderHost, 356 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_RemovePluginPlaceholderHost,
357 OnRemovePluginPlaceholderHost) 357 OnRemovePluginPlaceholderHost)
358 #endif 358 #endif
359 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_OpenAboutPlugins, 359 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_OpenAboutPlugins,
360 OnOpenAboutPlugins) 360 OnOpenAboutPlugins)
361 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_CouldNotLoadPlugin, 361 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_CouldNotLoadPlugin,
362 OnCouldNotLoadPlugin) 362 OnCouldNotLoadPlugin)
363 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_NPAPINotSupported,
364 OnNPAPINotSupported)
365 363
366 IPC_MESSAGE_UNHANDLED(return false) 364 IPC_MESSAGE_UNHANDLED(return false)
367 IPC_END_MESSAGE_MAP() 365 IPC_END_MESSAGE_MAP()
368 366
369 return true; 367 return true;
370 } 368 }
371 369
372 void PluginObserver::OnBlockedOutdatedPlugin(int placeholder_id, 370 void PluginObserver::OnBlockedOutdatedPlugin(int placeholder_id,
373 const std::string& identifier) { 371 const std::string& identifier) {
374 #if defined(ENABLE_PLUGIN_INSTALLATION) 372 #if defined(ENABLE_PLUGIN_INSTALLATION)
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 IDR_INFOBAR_PLUGIN_CRASHED, 423 IDR_INFOBAR_PLUGIN_CRASHED,
426 #if !defined(OS_MACOSX) && !defined(OS_IOS) && !defined(OS_ANDROID) 424 #if !defined(OS_MACOSX) && !defined(OS_IOS) && !defined(OS_ANDROID)
427 gfx::VectorIconId::EXTENSION_CRASHED, 425 gfx::VectorIconId::EXTENSION_CRASHED,
428 #else 426 #else
429 gfx::VectorIconId::VECTOR_ICON_NONE, 427 gfx::VectorIconId::VECTOR_ICON_NONE,
430 #endif 428 #endif
431 l10n_util::GetStringFUTF16(IDS_PLUGIN_INITIALIZATION_ERROR_PROMPT, 429 l10n_util::GetStringFUTF16(IDS_PLUGIN_INITIALIZATION_ERROR_PROMPT,
432 plugin_name), 430 plugin_name),
433 true); 431 true);
434 } 432 }
435
436 void PluginObserver::OnNPAPINotSupported(const std::string& identifier) {
437 #if defined(OS_WIN) && defined(ENABLE_PLUGIN_INSTALLATION)
438 scoped_ptr<PluginMetadata> plugin;
439 bool ret = PluginFinder::GetInstance()->FindPluginWithIdentifier(
440 identifier, NULL, &plugin);
441 DCHECK(ret);
442
443 PluginMetroModeInfoBarDelegate::Create(
444 InfoBarService::FromWebContents(web_contents()),
445 PluginMetroModeInfoBarDelegate::DESKTOP_MODE_REQUIRED, plugin->name());
446 #endif
447 }
OLDNEW
« no previous file with comments | « chrome/browser/plugins/plugin_observer.h ('k') | chrome/browser/ui/browser_command_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698