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

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 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 #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 20 matching lines...) Expand all
31 #include "content/public/browser/notification_source.h" 31 #include "content/public/browser/notification_source.h"
32 #include "content/public/browser/web_contents.h" 32 #include "content/public/browser/web_contents.h"
33 #include "grit/chromium_strings.h" 33 #include "grit/chromium_strings.h"
34 #include "grit/generated_resources.h" 34 #include "grit/generated_resources.h"
35 #include "ui/base/l10n/l10n_util.h" 35 #include "ui/base/l10n/l10n_util.h"
36 #include "ui/base/l10n/l10n_util_mac.h" 36 #include "ui/base/l10n/l10n_util_mac.h"
37 37
38 using content::OpenURLParams; 38 using content::OpenURLParams;
39 using content::Referrer; 39 using content::Referrer;
40 using content::WebContents; 40 using content::WebContents;
41 using extensions::Extension;
41 42
42 // A class that loads the extension icon on the I/O thread before showing the 43 // A class that loads the extension icon on the I/O thread before showing the
43 // confirmation dialog to uninstall the given extension. 44 // confirmation dialog to uninstall the given extension.
44 // Also acts as the extension's UI delegate in order to display the dialog. 45 // Also acts as the extension's UI delegate in order to display the dialog.
45 class AsyncUninstaller : public ExtensionUninstallDialog::Delegate { 46 class AsyncUninstaller : public ExtensionUninstallDialog::Delegate {
46 public: 47 public:
47 AsyncUninstaller(const Extension* extension, Profile* profile) 48 AsyncUninstaller(const Extension* extension, Profile* profile)
48 : extension_(extension), 49 : extension_(extension),
49 profile_(profile) { 50 profile_(profile) {
50 extension_uninstall_dialog_.reset( 51 extension_uninstall_dialog_.reset(
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 204
204 - (BOOL)validateMenuItem:(NSMenuItem*)menuItem { 205 - (BOOL)validateMenuItem:(NSMenuItem*)menuItem {
205 if ([menuItem tag] == kExtensionContextOptions) { 206 if ([menuItem tag] == kExtensionContextOptions) {
206 // Disable 'Options' if there are no options to set. 207 // Disable 'Options' if there are no options to set.
207 return extension_->options_url().spec().length() > 0; 208 return extension_->options_url().spec().length() > 0;
208 } 209 }
209 return YES; 210 return YES;
210 } 211 }
211 212
212 @end 213 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698