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

Unified Diff: chrome/browser/ui/extensions/shell_window.h

Issue 10871086: First part of remembering platform app window geometry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: return error instead of truncating id Created 8 years, 4 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/ui/extensions/shell_window.h
diff --git a/chrome/browser/ui/extensions/shell_window.h b/chrome/browser/ui/extensions/shell_window.h
index 36be67ebcfc2288910f70033780e8e733f811cc7..0efc28ff4b72b60a1f3c72db22b07e61011bbbd6 100644
--- a/chrome/browser/ui/extensions/shell_window.h
+++ b/chrome/browser/ui/extensions/shell_window.h
@@ -47,13 +47,20 @@ class ShellWindow : public content::NotificationObserver,
};
CreateParams();
+ ~CreateParams();
Frame frame;
// Specify the initial bounds of the window. If empty, the window will be a
// default size.
gfx::Rect bounds;
+ // Specify if bounds should be restored from a previous time.
+ bool restorePosition;
Mihai Parparita -not on Chrome 2012/08/29 21:39:14 Nit: should be called restore_position and restore
Marijn Kruisselbrink 2012/08/29 22:31:33 Done.
+ bool restoreSize;
+
gfx::Size minimum_size;
gfx::Size maximum_size;
+
+ std::string window_key;
};
static ShellWindow* Create(Profile* profile,
@@ -80,6 +87,8 @@ class ShellWindow : public content::NotificationObserver,
// invoke this method instead of using "delete this".
void OnNativeClose();
+ // Save the window position in the prefs.
+ virtual void SaveWindowPosition();
Mihai Parparita -not on Chrome 2012/08/29 21:39:14 Nit: Add an empty newline after this.
Marijn Kruisselbrink 2012/08/29 22:31:33 Done.
protected:
ShellWindow(Profile* profile,
const extensions::Extension* extension);
@@ -154,6 +163,10 @@ class ShellWindow : public content::NotificationObserver,
// weak pointer - owned by ExtensionService.
const extensions::Extension* extension_;
+ // Identifier that is used when saving and restoring geometry for this
+ // window.
+ std::string window_key_;
+
const SessionID session_id_;
scoped_ptr<TabContents> contents_;
// web_contents_ is owned by contents_.

Powered by Google App Engine
This is Rietveld 408576698