diff options
Diffstat (limited to 'chrome/views/window.h')
-rw-r--r-- | chrome/views/window.h | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/chrome/views/window.h b/chrome/views/window.h index 533bc27..ad8f020 100644 --- a/chrome/views/window.h +++ b/chrome/views/window.h @@ -52,7 +52,14 @@ class Window : public ContainerWin { // 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 @@ class Window : public ContainerWin { // 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 @@ class Window : public ContainerWin { // 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(); |