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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/extension_action_context_menu.mm

Issue 10375021: Move Extension into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Take 2 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 #import "chrome/browser/ui/cocoa/extensions/extension_action_context_menu.h" 5 #import "chrome/browser/ui/cocoa/extensions/extension_action_context_menu.h"
6 6
7 #include "base/sys_string_conversions.h" 7 #include "base/sys_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/extensions/extension_uninstall_dialog.h" 10 #include "chrome/browser/extensions/extension_uninstall_dialog.h"
(...skipping 19 matching lines...) Expand all
30 #include "content/public/browser/notification_source.h" 30 #include "content/public/browser/notification_source.h"
31 #include "content/public/browser/web_contents.h" 31 #include "content/public/browser/web_contents.h"
32 #include "grit/chromium_strings.h" 32 #include "grit/chromium_strings.h"
33 #include "grit/generated_resources.h" 33 #include "grit/generated_resources.h"
34 #include "ui/base/l10n/l10n_util.h" 34 #include "ui/base/l10n/l10n_util.h"
35 #include "ui/base/l10n/l10n_util_mac.h" 35 #include "ui/base/l10n/l10n_util_mac.h"
36 36
37 using content::OpenURLParams; 37 using content::OpenURLParams;
38 using content::Referrer; 38 using content::Referrer;
39 using content::WebContents; 39 using content::WebContents;
40 using extensions::Extension;
40 41
41 // A class that loads the extension icon on the I/O thread before showing the 42 // A class that loads the extension icon on the I/O thread before showing the
42 // confirmation dialog to uninstall the given extension. 43 // confirmation dialog to uninstall the given extension.
43 // Also acts as the extension's UI delegate in order to display the dialog. 44 // Also acts as the extension's UI delegate in order to display the dialog.
44 class AsyncUninstaller : public ExtensionUninstallDialog::Delegate { 45 class AsyncUninstaller : public ExtensionUninstallDialog::Delegate {
45 public: 46 public:
46 AsyncUninstaller(const Extension* extension, Profile* profile) 47 AsyncUninstaller(const Extension* extension, Profile* profile)
47 : extension_(extension), 48 : extension_(extension),
48 profile_(profile) { 49 profile_(profile) {
49 extension_uninstall_dialog_.reset( 50 extension_uninstall_dialog_.reset(
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 202
202 - (BOOL)validateMenuItem:(NSMenuItem*)menuItem { 203 - (BOOL)validateMenuItem:(NSMenuItem*)menuItem {
203 if ([menuItem tag] == kExtensionContextOptions) { 204 if ([menuItem tag] == kExtensionContextOptions) {
204 // Disable 'Options' if there are no options to set. 205 // Disable 'Options' if there are no options to set.
205 return extension_->options_url().spec().length() > 0; 206 return extension_->options_url().spec().length() > 0;
206 } 207 }
207 return YES; 208 return YES;
208 } 209 }
209 210
210 @end 211 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698