Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(228)

Side by Side Diff: chrome/browser/extensions/extension_context_menu_model.cc

Issue 10375021: Move Extension into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Take 6 Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/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/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/extensions/extension_tab_util.h" 9 #include "chrome/browser/extensions/extension_tab_util.h"
10 #include "chrome/browser/prefs/pref_service.h" 10 #include "chrome/browser/prefs/pref_service.h"
11 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
13 #include "chrome/common/extensions/extension.h" 13 #include "chrome/common/extensions/extension.h"
14 #include "chrome/common/extensions/extension_action.h" 14 #include "chrome/common/extensions/extension_action.h"
15 #include "chrome/common/extensions/extension_constants.h" 15 #include "chrome/common/extensions/extension_constants.h"
16 #include "chrome/common/pref_names.h" 16 #include "chrome/common/pref_names.h"
17 #include "chrome/common/url_constants.h" 17 #include "chrome/common/url_constants.h"
18 #include "content/public/browser/web_contents.h" 18 #include "content/public/browser/web_contents.h"
19 #include "grit/chromium_strings.h" 19 #include "grit/chromium_strings.h"
20 #include "grit/generated_resources.h" 20 #include "grit/generated_resources.h"
21 #include "ui/base/l10n/l10n_util.h" 21 #include "ui/base/l10n/l10n_util.h"
22 22
23 using content::OpenURLParams; 23 using content::OpenURLParams;
24 using content::Referrer; 24 using content::Referrer;
25 using content::WebContents; 25 using content::WebContents;
26 using extensions::Extension;
26 27
27 enum MenuEntries { 28 enum MenuEntries {
28 NAME = 0, 29 NAME = 0,
29 CONFIGURE, 30 CONFIGURE,
30 HIDE, 31 HIDE,
31 DISABLE, 32 DISABLE,
32 UNINSTALL, 33 UNINSTALL,
33 MANAGE 34 MANAGE
34 }; 35 };
35 36
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 if (extension->browser_action()) 151 if (extension->browser_action())
151 AddItemWithStringId(HIDE, IDS_EXTENSIONS_HIDE_BUTTON); 152 AddItemWithStringId(HIDE, IDS_EXTENSIONS_HIDE_BUTTON);
152 AddSeparator(); 153 AddSeparator();
153 AddItemWithStringId(MANAGE, IDS_MANAGE_EXTENSIONS); 154 AddItemWithStringId(MANAGE, IDS_MANAGE_EXTENSIONS);
154 } 155 }
155 156
156 const Extension* ExtensionContextMenuModel::GetExtension() const { 157 const Extension* ExtensionContextMenuModel::GetExtension() const {
157 ExtensionService* extension_service = profile_->GetExtensionService(); 158 ExtensionService* extension_service = profile_->GetExtensionService();
158 return extension_service->GetExtensionById(extension_id_, false); 159 return extension_service->GetExtensionById(extension_id_, false);
159 } 160 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698