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/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 | 39 |
40 #if defined(OS_WIN) | 40 #if defined(OS_WIN) |
41 #include "base/win/metro.h" | 41 #include "base/win/metro.h" |
42 #endif | 42 #endif |
43 | 43 |
44 using content::OpenURLParams; | 44 using content::OpenURLParams; |
45 using content::PluginService; | 45 using content::PluginService; |
46 using content::Referrer; | 46 using content::Referrer; |
47 using content::WebContents; | 47 using content::WebContents; |
48 | 48 |
49 int PluginObserver::kUserDataKey; | 49 DEFINE_WEB_CONTENTS_USER_DATA_KEY(PluginObserver) |
50 | 50 |
51 namespace { | 51 namespace { |
52 | 52 |
53 #if defined(ENABLE_PLUGIN_INSTALLATION) | 53 #if defined(ENABLE_PLUGIN_INSTALLATION) |
54 | 54 |
55 // ConfirmInstallDialogDelegate ------------------------------------------------ | 55 // ConfirmInstallDialogDelegate ------------------------------------------------ |
56 | 56 |
57 class ConfirmInstallDialogDelegate : public TabModalConfirmDialogDelegate, | 57 class ConfirmInstallDialogDelegate : public TabModalConfirmDialogDelegate, |
58 public WeakPluginInstallerObserver { | 58 public WeakPluginInstallerObserver { |
59 public: | 59 public: |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 InfoBarTabHelper* infobar_helper = tab_contents->infobar_tab_helper(); | 348 InfoBarTabHelper* infobar_helper = tab_contents->infobar_tab_helper(); |
349 infobar_helper->AddInfoBar(new SimpleAlertInfoBarDelegate( | 349 infobar_helper->AddInfoBar(new SimpleAlertInfoBarDelegate( |
350 infobar_helper, | 350 infobar_helper, |
351 &ResourceBundle::GetSharedInstance().GetNativeImageNamed( | 351 &ResourceBundle::GetSharedInstance().GetNativeImageNamed( |
352 IDR_INFOBAR_PLUGIN_CRASHED), | 352 IDR_INFOBAR_PLUGIN_CRASHED), |
353 l10n_util::GetStringFUTF16(IDS_PLUGIN_INITIALIZATION_ERROR_PROMPT, | 353 l10n_util::GetStringFUTF16(IDS_PLUGIN_INITIALIZATION_ERROR_PROMPT, |
354 plugin_name), | 354 plugin_name), |
355 true /* auto_expire */)); | 355 true /* auto_expire */)); |
356 } | 356 } |
357 | 357 |
OLD | NEW |