OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/extensions/extension_disabled_infobar_delegate.h" | 5 #include "chrome/browser/extensions/extension_disabled_infobar_delegate.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
11 #include "chrome/browser/extensions/extension_install_ui.h" | 11 #include "chrome/browser/extensions/extension_install_ui.h" |
12 #include "chrome/browser/extensions/extension_service.h" | 12 #include "chrome/browser/extensions/extension_service.h" |
13 #include "chrome/browser/tab_contents/infobar_delegate.h" | 13 #include "chrome/browser/tab_contents/infobar_delegate.h" |
14 #include "chrome/browser/tab_contents/tab_contents.h" | 14 #include "chrome/browser/tab_contents/tab_contents.h" |
15 #include "chrome/browser/browser_list.h" | 15 #include "chrome/browser/browser_list.h" |
16 #include "chrome/common/extensions/extension_file_util.h" | 16 #include "chrome/common/extensions/extension_file_util.h" |
17 #include "chrome/common/extensions/extension_resource.h" | 17 #include "chrome/common/extensions/extension_resource.h" |
| 18 #include "chrome/common/notification_details.h" |
18 #include "chrome/common/notification_registrar.h" | 19 #include "chrome/common/notification_registrar.h" |
19 #include "chrome/common/notification_service.h" | 20 #include "chrome/common/notification_source.h" |
20 #include "grit/generated_resources.h" | 21 #include "grit/generated_resources.h" |
21 | 22 |
22 class ExtensionDisabledDialogDelegate | 23 class ExtensionDisabledDialogDelegate |
23 : public ExtensionInstallUI::Delegate, | 24 : public ExtensionInstallUI::Delegate, |
24 public base::RefCountedThreadSafe<ExtensionDisabledDialogDelegate> { | 25 public base::RefCountedThreadSafe<ExtensionDisabledDialogDelegate> { |
25 public: | 26 public: |
26 ExtensionDisabledDialogDelegate(Profile* profile, | 27 ExtensionDisabledDialogDelegate(Profile* profile, |
27 ExtensionService* service, | 28 ExtensionService* service, |
28 const Extension* extension) | 29 const Extension* extension) |
29 : service_(service), extension_(extension) { | 30 : service_(service), extension_(extension) { |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 | 138 |
138 tab_contents->AddInfoBar(new ExtensionDisabledInfobarDelegate( | 139 tab_contents->AddInfoBar(new ExtensionDisabledInfobarDelegate( |
139 tab_contents, service, extension)); | 140 tab_contents, service, extension)); |
140 } | 141 } |
141 | 142 |
142 void ShowExtensionDisabledDialog(ExtensionService* service, Profile* profile, | 143 void ShowExtensionDisabledDialog(ExtensionService* service, Profile* profile, |
143 const Extension* extension) { | 144 const Extension* extension) { |
144 // This object manages its own lifetime. | 145 // This object manages its own lifetime. |
145 new ExtensionDisabledDialogDelegate(profile, service, extension); | 146 new ExtensionDisabledDialogDelegate(profile, service, extension); |
146 } | 147 } |
OLD | NEW |