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

Unified Diff: chrome/views/window.h

Issue 10896: Re-do the way browser windows are shown:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 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
Index: chrome/views/window.h
===================================================================
--- chrome/views/window.h (revision 5374)
+++ chrome/views/window.h (working copy)
@@ -52,8 +52,15 @@
// Show the window.
void Show();
- void Show(int show_style);
+ void Show(int show_state);
+ // Retrieve the show state of the window. This is one of the SW_SHOW* flags
+ // passed into Windows' ShowWindow method. For normal windows this defaults
+ // to SW_SHOWNORMAL, however windows (e.g. the main window) can override this
+ // method to provide different values (e.g. retrieve the user's specified
+ // show state from the shortcut starutp info).
+ virtual int GetShowState() const;
+
// Activate the window, assuming it already exists and is visible.
void Activate();
@@ -104,24 +111,6 @@
// The parent of this window.
HWND owning_window() const { return owning_hwnd_; }
- // Convenience methods for storing/retrieving window location information
- // to/from a PrefService using the specified |entry| name.
- // WindowDelegate instances can use these methods in their implementation of
- // SaveWindowPosition/RestoreWindowPosition to save windows' location to
- // preferences.
- static bool SaveWindowPositionToPrefService(PrefService* pref_service,
- const std::wstring& entry,
- const CRect& bounds,
- bool maximized,
- bool always_on_top);
- // Returns true if the window location was retrieved from the PrefService and
- // set in |bounds|, |maximized| and |always_on_top|.
- static bool RestoreWindowPositionFromPrefService(PrefService* pref_service,
- const std::wstring& entry,
- CRect* bounds,
- bool* maximized,
- bool* always_on_top);
-
// Returns the preferred size of the contents view of this window based on
// its localized size data. The width in cols is held in a localized string
// resource identified by |col_resource_id|, the height in the same fashion.
@@ -195,6 +184,10 @@
// bounds used when the window was created.
void SetInitialBounds(const gfx::Rect& create_bounds);
+ // Restore saved always on stop state and add the always on top system menu
+ // if needed.
+ void InitAlwaysOnTopState();
+
// Add an item for "Always on Top" to the System Menu.
void AddAlwaysOnTopSystemMenuItem();

Powered by Google App Engine
This is Rietveld 408576698