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

Unified Diff: chrome/browser/app_controller_mac.mm

Issue 100206: Initial prefs window xib from Cole. Hook the menu up to (empty) code. Use sco... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/app_controller_mac.mm
===================================================================
--- chrome/browser/app_controller_mac.mm (revision 14938)
+++ chrome/browser/app_controller_mac.mm (working copy)
@@ -30,7 +30,7 @@
- (void)awakeFromNib {
// Set up the command updater for when there are no windows open
[self initMenuState];
- bookmarkMenuBridge_ = new BookmarkMenuBridge();
+ bookmarkMenuBridge_.reset(new BookmarkMenuBridge());
}
- (void)applicationDidFinishLaunching:(NSNotification*)notify {
@@ -56,8 +56,6 @@
}
- (void)dealloc {
- delete bookmarkMenuBridge_;
- delete menuState_;
[super dealloc];
}
@@ -110,6 +108,8 @@
enable = menuState_->IsCommandEnabled(tag) ? YES : NO;
} else if (action == @selector(quit:)) {
enable = YES;
+ } else if (action == @selector(showPreferences:)) {
+ enable = YES;
}
return enable;
}
@@ -156,7 +156,7 @@
}
- (void)initMenuState {
- menuState_ = new CommandUpdater(NULL);
+ menuState_.reset(new CommandUpdater(NULL));
menuState_->UpdateCommandEnabled(IDC_NEW_WINDOW, true);
menuState_->UpdateCommandEnabled(IDC_NEW_INCOGNITO_WINDOW, true);
menuState_->UpdateCommandEnabled(IDC_OPEN_FILE, true);
@@ -231,4 +231,10 @@
OpenURLs(gurlVector);
}
+// Show the preferences window, or bring it to the front if it's already
+// visible.
+- (IBAction)showPreferences:(id)sender {
+// TODO(pinkerton): more goes here...
+}
+
@end

Powered by Google App Engine
This is Rietveld 408576698