| OLD | NEW |
| 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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 } | 359 } |
| 360 delete it->second; | 360 delete it->second; |
| 361 plugin_placeholders_.erase(it); | 361 plugin_placeholders_.erase(it); |
| 362 } | 362 } |
| 363 #endif // defined(ENABLE_PLUGIN_INSTALLATION) | 363 #endif // defined(ENABLE_PLUGIN_INSTALLATION) |
| 364 | 364 |
| 365 void PluginObserver::OnOpenAboutPlugins() { | 365 void PluginObserver::OnOpenAboutPlugins() { |
| 366 web_contents()->OpenURL(OpenURLParams( | 366 web_contents()->OpenURL(OpenURLParams( |
| 367 GURL(chrome::kAboutPluginsURL), | 367 GURL(chrome::kAboutPluginsURL), |
| 368 content::Referrer(web_contents()->GetURL(), | 368 content::Referrer(web_contents()->GetURL(), |
| 369 WebKit::WebReferrerPolicyDefault), | 369 blink::WebReferrerPolicyDefault), |
| 370 NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_AUTO_BOOKMARK, false)); | 370 NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_AUTO_BOOKMARK, false)); |
| 371 } | 371 } |
| 372 | 372 |
| 373 void PluginObserver::OnCouldNotLoadPlugin(const base::FilePath& plugin_path) { | 373 void PluginObserver::OnCouldNotLoadPlugin(const base::FilePath& plugin_path) { |
| 374 g_browser_process->metrics_service()->LogPluginLoadingError(plugin_path); | 374 g_browser_process->metrics_service()->LogPluginLoadingError(plugin_path); |
| 375 string16 plugin_name = | 375 string16 plugin_name = |
| 376 PluginService::GetInstance()->GetPluginDisplayNameByPath(plugin_path); | 376 PluginService::GetInstance()->GetPluginDisplayNameByPath(plugin_path); |
| 377 SimpleAlertInfoBarDelegate::Create( | 377 SimpleAlertInfoBarDelegate::Create( |
| 378 InfoBarService::FromWebContents(web_contents()), | 378 InfoBarService::FromWebContents(web_contents()), |
| 379 IDR_INFOBAR_PLUGIN_CRASHED, | 379 IDR_INFOBAR_PLUGIN_CRASHED, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 404 scoped_ptr<PluginMetadata> plugin; | 404 scoped_ptr<PluginMetadata> plugin; |
| 405 bool ret = PluginFinder::GetInstance()->FindPluginWithIdentifier( | 405 bool ret = PluginFinder::GetInstance()->FindPluginWithIdentifier( |
| 406 identifier, NULL, &plugin); | 406 identifier, NULL, &plugin); |
| 407 DCHECK(ret); | 407 DCHECK(ret); |
| 408 | 408 |
| 409 PluginMetroModeInfoBarDelegate::Create( | 409 PluginMetroModeInfoBarDelegate::Create( |
| 410 InfoBarService::FromWebContents(web_contents()), | 410 InfoBarService::FromWebContents(web_contents()), |
| 411 PluginMetroModeInfoBarDelegate::DESKTOP_MODE_REQUIRED, plugin->name()); | 411 PluginMetroModeInfoBarDelegate::DESKTOP_MODE_REQUIRED, plugin->name()); |
| 412 #endif | 412 #endif |
| 413 } | 413 } |
| OLD | NEW |