summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/page_info_window_controller.h
diff options
context:
space:
mode:
authorpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-21 14:19:09 +0000
committerpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-21 14:19:09 +0000
commit61e76d9bf46423e8dcb6f77e8e91262af55b7a03 (patch)
treea02f4e6e9812331d7026705f4f08ba740607fa90 /chrome/browser/cocoa/page_info_window_controller.h
parent1c9b152007f05e1767b05986e5cb69fbb2629e43 (diff)
downloadchromium_src-61e76d9bf46423e8dcb6f77e8e91262af55b7a03.zip
chromium_src-61e76d9bf46423e8dcb6f77e8e91262af55b7a03.tar.gz
chromium_src-61e76d9bf46423e8dcb6f77e8e91262af55b7a03.tar.bz2
Make the page info window remember its placement origin on the Mac
* Store x/y origin in the local state PrefService * Offset new windows when creating them so they don't overlap * Add a unit test for remembering window placement * Refactor PageInfoWindowControllerTest to make use of SetUp() Patch from Robert Sesek (rsesek@chromium.org) BUG=none TEST=Open a page info window and move it. Open another and it should open in the new location. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23954 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/page_info_window_controller.h')
-rw-r--r--chrome/browser/cocoa/page_info_window_controller.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/page_info_window_controller.h b/chrome/browser/cocoa/page_info_window_controller.h
index 132c684..c62893b 100644
--- a/chrome/browser/cocoa/page_info_window_controller.h
+++ b/chrome/browser/cocoa/page_info_window_controller.h
@@ -8,6 +8,7 @@
#include "base/scoped_ptr.h"
class PageInfoWindowMac;
+class PrefService;
// This NSWindowController subclass implements the Cocoa window for
// PageInfoWindow. This creates and owns the PageInfoWindowMac subclass.
@@ -58,3 +59,11 @@ class PageInfoWindowMac;
- (void)setShowHistoryBox:(BOOL)show;
@end
+
+@interface PageInfoWindowController (ExposedForTesting)
+
+// Saves the window's origin into the given PrefService. Caller is responsible
+// for making sure |prefs| is not NULL.
+- (void)saveWindowPositionToPrefs:(PrefService*)prefs;
+
+@end