| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ASH_WM_WINDOW_STATE_H_ | 5 #ifndef ASH_WM_WINDOW_STATE_H_ |
| 6 #define ASH_WM_WINDOW_STATE_H_ | 6 #define ASH_WM_WINDOW_STATE_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/wm/wm_types.h" | 9 #include "ash/wm/wm_types.h" |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 // bounds instead of the restore bounds. Setting this key overrides that | 117 // bounds instead of the restore bounds. Setting this key overrides that |
| 118 // behaviour). The flag is reset to the default value after the window is | 118 // behaviour). The flag is reset to the default value after the window is |
| 119 // restored. | 119 // restored. |
| 120 bool always_restores_to_restore_bounds() const { | 120 bool always_restores_to_restore_bounds() const { |
| 121 return always_restores_to_restore_bounds_; | 121 return always_restores_to_restore_bounds_; |
| 122 } | 122 } |
| 123 void set_always_restores_to_restore_bounds(bool value) { | 123 void set_always_restores_to_restore_bounds(bool value) { |
| 124 always_restores_to_restore_bounds_ = value; | 124 always_restores_to_restore_bounds_ = value; |
| 125 } | 125 } |
| 126 | 126 |
| 127 // Gets/sets whether the shelf should be hidden when this window is |
| 128 // fullscreen. |
| 129 bool hide_shelf_when_fullscreen() const { |
| 130 return hide_shelf_when_fullscreen_; |
| 131 } |
| 132 |
| 133 void set_hide_shelf_when_fullscreen(bool value) { |
| 134 hide_shelf_when_fullscreen_ = value; |
| 135 } |
| 136 |
| 127 // Gets/Sets the bounds of the window before it was moved by the auto window | 137 // Gets/Sets the bounds of the window before it was moved by the auto window |
| 128 // management. As long as it was not auto-managed, it will return NULL. | 138 // management. As long as it was not auto-managed, it will return NULL. |
| 129 const gfx::Rect* pre_auto_manage_window_bounds() const { | 139 const gfx::Rect* pre_auto_manage_window_bounds() const { |
| 130 return pre_auto_manage_window_bounds_.get(); | 140 return pre_auto_manage_window_bounds_.get(); |
| 131 } | 141 } |
| 132 void SetPreAutoManageWindowBounds(const gfx::Rect& bounds); | 142 void SetPreAutoManageWindowBounds(const gfx::Rect& bounds); |
| 133 | 143 |
| 134 // Layout related properties | 144 // Layout related properties |
| 135 | 145 |
| 136 void AddObserver(WindowStateObserver* observer); | 146 void AddObserver(WindowStateObserver* observer); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 bool window_position_managed_; | 238 bool window_position_managed_; |
| 229 bool bounds_changed_by_user_; | 239 bool bounds_changed_by_user_; |
| 230 bool panel_attached_; | 240 bool panel_attached_; |
| 231 bool continue_drag_after_reparent_; | 241 bool continue_drag_after_reparent_; |
| 232 bool ignored_by_shelf_; | 242 bool ignored_by_shelf_; |
| 233 bool can_consume_system_keys_; | 243 bool can_consume_system_keys_; |
| 234 bool top_row_keys_are_function_keys_; | 244 bool top_row_keys_are_function_keys_; |
| 235 WindowResizer* window_resizer_; | 245 WindowResizer* window_resizer_; |
| 236 | 246 |
| 237 bool always_restores_to_restore_bounds_; | 247 bool always_restores_to_restore_bounds_; |
| 248 bool hide_shelf_when_fullscreen_; |
| 238 | 249 |
| 239 // A property to remember the window position which was set before the | 250 // A property to remember the window position which was set before the |
| 240 // auto window position manager changed the window bounds, so that it can get | 251 // auto window position manager changed the window bounds, so that it can get |
| 241 // restored when only this one window gets shown. | 252 // restored when only this one window gets shown. |
| 242 scoped_ptr<gfx::Rect> pre_auto_manage_window_bounds_; | 253 scoped_ptr<gfx::Rect> pre_auto_manage_window_bounds_; |
| 243 | 254 |
| 244 ObserverList<WindowStateObserver> observer_list_; | 255 ObserverList<WindowStateObserver> observer_list_; |
| 245 | 256 |
| 246 WindowShowType window_show_type_; | 257 WindowShowType window_show_type_; |
| 247 | 258 |
| 248 DISALLOW_COPY_AND_ASSIGN(WindowState); | 259 DISALLOW_COPY_AND_ASSIGN(WindowState); |
| 249 }; | 260 }; |
| 250 | 261 |
| 251 // Returns the WindowState for active window. Returns |NULL| | 262 // Returns the WindowState for active window. Returns |NULL| |
| 252 // if there is no active window. | 263 // if there is no active window. |
| 253 ASH_EXPORT WindowState* GetActiveWindowState(); | 264 ASH_EXPORT WindowState* GetActiveWindowState(); |
| 254 | 265 |
| 255 // Returns the WindowState for |window|. Creates WindowState | 266 // Returns the WindowState for |window|. Creates WindowState |
| 256 // if it didn't exist. The settings object is owned by |window|. | 267 // if it didn't exist. The settings object is owned by |window|. |
| 257 ASH_EXPORT WindowState* GetWindowState(aura::Window* window); | 268 ASH_EXPORT WindowState* GetWindowState(aura::Window* window); |
| 258 | 269 |
| 259 // const version of GetWindowState. | 270 // const version of GetWindowState. |
| 260 ASH_EXPORT const WindowState* | 271 ASH_EXPORT const WindowState* |
| 261 GetWindowState(const aura::Window* window); | 272 GetWindowState(const aura::Window* window); |
| 262 | 273 |
| 263 } // namespace wm | 274 } // namespace wm |
| 264 } // namespace ash | 275 } // namespace ash |
| 265 | 276 |
| 266 #endif // ASH_WM_WINDOW_STATE_H_ | 277 #endif // ASH_WM_WINDOW_STATE_H_ |
| OLD | NEW |