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

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

Issue 12279015: Mac Chromium style checker cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
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/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "base/prefs/public/pref_change_registrar.h" 8 #include "base/prefs/public/pref_change_registrar.h"
9 #include "base/sys_string_conversions.h" 9 #include "base/sys_string_conversions.h"
10 #include "chrome/browser/extensions/extension_action.h" 10 #include "chrome/browser/extensions/extension_action.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 class AsyncUninstaller : public ExtensionUninstallDialog::Delegate { 52 class AsyncUninstaller : public ExtensionUninstallDialog::Delegate {
53 public: 53 public:
54 AsyncUninstaller(const Extension* extension, Browser* browser) 54 AsyncUninstaller(const Extension* extension, Browser* browser)
55 : extension_(extension), 55 : extension_(extension),
56 profile_(browser->profile()) { 56 profile_(browser->profile()) {
57 extension_uninstall_dialog_.reset( 57 extension_uninstall_dialog_.reset(
58 ExtensionUninstallDialog::Create(profile_, browser, this)); 58 ExtensionUninstallDialog::Create(profile_, browser, this));
59 extension_uninstall_dialog_->ConfirmUninstall(extension_); 59 extension_uninstall_dialog_->ConfirmUninstall(extension_);
60 } 60 }
61 61
62 ~AsyncUninstaller() {} 62 virtual ~AsyncUninstaller() {}
63 63
64 // ExtensionUninstallDialog::Delegate: 64 // ExtensionUninstallDialog::Delegate:
65 virtual void ExtensionUninstallAccepted() { 65 virtual void ExtensionUninstallAccepted() OVERRIDE {
66 extensions::ExtensionSystem::Get(profile_)->extension_service()-> 66 extensions::ExtensionSystem::Get(profile_)->extension_service()->
67 UninstallExtension(extension_->id(), false, NULL); 67 UninstallExtension(extension_->id(), false, NULL);
68 } 68 }
69 virtual void ExtensionUninstallCanceled() {} 69 virtual void ExtensionUninstallCanceled() OVERRIDE {}
70 70
71 private: 71 private:
72 // The extension that we're loading the icon for. Weak. 72 // The extension that we're loading the icon for. Weak.
73 const Extension* extension_; 73 const Extension* extension_;
74 74
75 // The current profile. Weak. 75 // The current profile. Weak.
76 Profile* profile_; 76 Profile* profile_;
77 77
78 scoped_ptr<ExtensionUninstallDialog> extension_uninstall_dialog_; 78 scoped_ptr<ExtensionUninstallDialog> extension_uninstall_dialog_;
79 79
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 - (BOOL)validateMenuItem:(NSMenuItem*)menuItem { 275 - (BOOL)validateMenuItem:(NSMenuItem*)menuItem {
276 if ([menuItem tag] == kExtensionContextOptions) { 276 if ([menuItem tag] == kExtensionContextOptions) {
277 // Disable 'Options' if there are no options to set. 277 // Disable 'Options' if there are no options to set.
278 return extensions::ManifestURL:: 278 return extensions::ManifestURL::
279 GetOptionsPage(extension_).spec().length() > 0; 279 GetOptionsPage(extension_).spec().length() > 0;
280 } 280 }
281 return YES; 281 return YES;
282 } 282 }
283 283
284 @end 284 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698