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_context_menu_model.h" | 5 #include "chrome/browser/extensions/extension_context_menu_model.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/browser.h" | |
9 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
| 9 #include "chrome/browser/extensions/extensions_service.h" |
10 #include "chrome/browser/extensions/extension_tabs_module.h" | 10 #include "chrome/browser/extensions/extension_tabs_module.h" |
11 #include "chrome/browser/extensions/extensions_service.h" | |
12 #include "chrome/browser/prefs/pref_service.h" | 11 #include "chrome/browser/prefs/pref_service.h" |
13 #include "chrome/browser/profile.h" | 12 #include "chrome/browser/profile.h" |
14 #include "chrome/common/extensions/extension.h" | 13 #include "chrome/browser/ui/browser.h" |
15 #include "chrome/common/extensions/extension_action.h" | 14 #include "chrome/common/extensions/extension_action.h" |
16 #include "chrome/common/extensions/extension_constants.h" | 15 #include "chrome/common/extensions/extension_constants.h" |
| 16 #include "chrome/common/extensions/extension.h" |
17 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
18 #include "chrome/common/url_constants.h" | 18 #include "chrome/common/url_constants.h" |
19 #include "grit/generated_resources.h" | 19 #include "grit/generated_resources.h" |
20 | 20 |
21 enum MenuEntries { | 21 enum MenuEntries { |
22 NAME = 0, | 22 NAME = 0, |
23 CONFIGURE, | 23 CONFIGURE, |
24 DISABLE, | 24 DISABLE, |
25 UNINSTALL, | 25 UNINSTALL, |
26 MANAGE, | 26 MANAGE, |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 } | 148 } |
149 | 149 |
150 void ExtensionContextMenuModel::InstallUIAbort() { | 150 void ExtensionContextMenuModel::InstallUIAbort() { |
151 Release(); | 151 Release(); |
152 } | 152 } |
153 | 153 |
154 const Extension* ExtensionContextMenuModel::GetExtension() const { | 154 const Extension* ExtensionContextMenuModel::GetExtension() const { |
155 ExtensionsService* extension_service = profile_->GetExtensionsService(); | 155 ExtensionsService* extension_service = profile_->GetExtensionsService(); |
156 return extension_service->GetExtensionById(extension_id_, false); | 156 return extension_service->GetExtensionById(extension_id_, false); |
157 } | 157 } |
OLD | NEW |