diff options
author | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-30 17:59:24 +0000 |
---|---|---|
committer | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-30 17:59:24 +0000 |
commit | 4240438bc0860628bc93b59c291c9a4b6f69d2ff (patch) | |
tree | 6fa475044ba9b83cdb1e4290da649cb04ddaa9c7 /chrome/browser/app_controller_mac.mm | |
parent | 75e287db9508753ada184ee4252b679912f6f085 (diff) | |
download | chromium_src-4240438bc0860628bc93b59c291c9a4b6f69d2ff.zip chromium_src-4240438bc0860628bc93b59c291c9a4b6f69d2ff.tar.gz chromium_src-4240438bc0860628bc93b59c291c9a4b6f69d2ff.tar.bz2 |
Add a very basic preferences window controller with unit test. Fix the prefs nib to know the FileOwner is a NSWindowController and hook them together.
Review URL: http://codereview.chromium.org/102015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14958 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/app_controller_mac.mm')
-rw-r--r-- | chrome/browser/app_controller_mac.mm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm index 2992289..082d0f5 100644 --- a/chrome/browser/app_controller_mac.mm +++ b/chrome/browser/app_controller_mac.mm @@ -13,6 +13,7 @@ #include "chrome/browser/browser_list.h" #include "chrome/browser/browser_shutdown.h" #import "chrome/browser/cocoa/bookmark_menu_bridge.h" +#import "chrome/browser/cocoa/preferences_window_controller.h" #include "chrome/browser/command_updater.h" #include "chrome/browser/profile_manager.h" #include "chrome/common/temp_scaffolding_stubs.h" @@ -184,7 +185,7 @@ void OpenURLs(const std::vector<GURL>& urls) { launch.OpenURLsInBrowser(BrowserList::GetLastActive(), false, urls); } -} +} // namespace - (void)getUrl:(NSAppleEventDescriptor*)event withReply:(NSAppleEventDescriptor*)reply { @@ -234,7 +235,12 @@ void OpenURLs(const std::vector<GURL>& urls) { // Show the preferences window, or bring it to the front if it's already // visible. - (IBAction)showPreferences:(id)sender { -// TODO(pinkerton): more goes here... + if (!prefsController_.get()) { + PrefService* prefs = [self defaultProfile]->GetPrefs(); + prefsController_.reset([[PreferencesWindowController alloc] + initWithPrefs:prefs]); + } + [prefsController_ showPreferences:sender]; } @end |