| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 | 76 |
| 77 private: | 77 private: |
| 78 content::WebContents* web_contents_; | 78 content::WebContents* web_contents_; |
| 79 scoped_ptr<PluginMetadata> plugin_metadata_; | 79 scoped_ptr<PluginMetadata> plugin_metadata_; |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 ConfirmInstallDialogDelegate::ConfirmInstallDialogDelegate( | 82 ConfirmInstallDialogDelegate::ConfirmInstallDialogDelegate( |
| 83 content::WebContents* web_contents, | 83 content::WebContents* web_contents, |
| 84 PluginInstaller* installer, | 84 PluginInstaller* installer, |
| 85 scoped_ptr<PluginMetadata> plugin_metadata) | 85 scoped_ptr<PluginMetadata> plugin_metadata) |
| 86 : TabModalConfirmDialogDelegate(web_contents), | 86 : WeakPluginInstallerObserver(installer), |
| 87 WeakPluginInstallerObserver(installer), | |
| 88 web_contents_(web_contents), | 87 web_contents_(web_contents), |
| 89 plugin_metadata_(plugin_metadata.Pass()) { | 88 plugin_metadata_(plugin_metadata.Pass()) { |
| 90 } | 89 } |
| 91 | 90 |
| 92 string16 ConfirmInstallDialogDelegate::GetTitle() { | 91 string16 ConfirmInstallDialogDelegate::GetTitle() { |
| 93 return l10n_util::GetStringFUTF16( | 92 return l10n_util::GetStringFUTF16( |
| 94 IDS_PLUGIN_CONFIRM_INSTALL_DIALOG_TITLE, plugin_metadata_->name()); | 93 IDS_PLUGIN_CONFIRM_INSTALL_DIALOG_TITLE, plugin_metadata_->name()); |
| 95 } | 94 } |
| 96 | 95 |
| 97 string16 ConfirmInstallDialogDelegate::GetMessage() { | 96 string16 ConfirmInstallDialogDelegate::GetMessage() { |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 scoped_ptr<PluginMetadata> plugin; | 404 scoped_ptr<PluginMetadata> plugin; |
| 406 bool ret = PluginFinder::GetInstance()->FindPluginWithIdentifier( | 405 bool ret = PluginFinder::GetInstance()->FindPluginWithIdentifier( |
| 407 identifier, NULL, &plugin); | 406 identifier, NULL, &plugin); |
| 408 DCHECK(ret); | 407 DCHECK(ret); |
| 409 | 408 |
| 410 PluginMetroModeInfoBarDelegate::Create( | 409 PluginMetroModeInfoBarDelegate::Create( |
| 411 InfoBarService::FromWebContents(web_contents()), | 410 InfoBarService::FromWebContents(web_contents()), |
| 412 PluginMetroModeInfoBarDelegate::DESKTOP_MODE_REQUIRED, plugin->name()); | 411 PluginMetroModeInfoBarDelegate::DESKTOP_MODE_REQUIRED, plugin->name()); |
| 413 #endif | 412 #endif |
| 414 } | 413 } |
| OLD | NEW |