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

Unified Diff: chrome/browser/cocoa/preferences_window_controller.h

Issue 391050: Implemented ShowOptionsWindow() for OS X (except the highlighting (Closed)
Patch Set: Fixed unittest. Created 11 years, 1 month 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
« no previous file with comments | « chrome/browser/app_controller_mac.mm ('k') | chrome/browser/cocoa/preferences_window_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/preferences_window_controller.h
diff --git a/chrome/browser/cocoa/preferences_window_controller.h b/chrome/browser/cocoa/preferences_window_controller.h
index bd8e9647627c50b259f407ffc3ab917d2500e343..602826981477995c93e57121f4cbd152b3f2002f 100644
--- a/chrome/browser/cocoa/preferences_window_controller.h
+++ b/chrome/browser/cocoa/preferences_window_controller.h
@@ -6,6 +6,7 @@
#include "base/scoped_ptr.h"
#include "base/scoped_nsobject.h"
+#include "chrome/browser/options_window.h"
#include "chrome/common/pref_member.h"
@class CustomHomePagesModel;
@@ -30,6 +31,7 @@ class ProfileSyncService;
@interface PreferencesWindowController : NSWindowController {
@private
Profile* profile_; // weak ref
+ OptionsPage initialPage_;
PrefService* prefs_; // weak ref - Obtained from profile_ for convenience.
// weak ref - Also obtained from profile_ for convenience. May be NULL.
ProfileSyncService* syncService_;
@@ -98,11 +100,14 @@ class ProfileSyncService;
}
// Designated initializer. |profile| should not be NULL.
-- (id)initWithProfile:(Profile*)profile;
+- (id)initWithProfile:(Profile*)profile initialPage:(OptionsPage)initialPage;
// Show the preferences window.
- (void)showPreferences:(id)sender;
+// Switch to the given preference page.
+- (void)switchToPage:(OptionsPage)page animate:(BOOL)animate;
+
// IBAction methods for responding to user actions.
// Basics panel
@@ -134,3 +139,30 @@ class ProfileSyncService;
extern NSString* const kUserDoneEditingPrefsNotification;
@end
+
+@interface PreferencesWindowController(Testing)
+
+- (IntegerPrefMember*)lastSelectedPage;
+- (NSToolbar*)toolbar;
+- (NSView*)basicsView;
+- (NSView*)personalStuffView;
+- (NSView*)underTheHoodView;
+
+// Converts the given OptionsPage value (which may be OPTIONS_PAGE_DEFAULT)
+// into a concrete OptionsPage value.
+- (OptionsPage)normalizePage:(OptionsPage)page;
+
+// Returns the toolbar item corresponding to the given page. Should be
+// called only after awakeFromNib is.
+- (NSToolbarItem*)getToolbarItemForPage:(OptionsPage)page;
+
+// Returns the (normalized) page corresponding to the given toolbar item.
+// Should be called only after awakeFromNib is.
+- (OptionsPage)getPageForToolbarItem:(NSToolbarItem*)toolbarItem;
+
+// Returns the view corresponding to the given page. Should be called
+// only after awakeFromNib is.
+- (NSView*)getPrefsViewForPage:(OptionsPage)page;
+
+@end
+
« no previous file with comments | « chrome/browser/app_controller_mac.mm ('k') | chrome/browser/cocoa/preferences_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698