Chromium Code Reviews| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 115 // bounds instead of the restore bounds. Setting this key overrides that | 115 // bounds instead of the restore bounds. Setting this key overrides that |
| 116 // behaviour). The flag is reset to the default value after the window is | 116 // behaviour). The flag is reset to the default value after the window is |
| 117 // restored. | 117 // restored. |
| 118 bool always_restores_to_restore_bounds() const { | 118 bool always_restores_to_restore_bounds() const { |
| 119 return always_restores_to_restore_bounds_; | 119 return always_restores_to_restore_bounds_; |
| 120 } | 120 } |
| 121 void set_always_restores_to_restore_bounds(bool value) { | 121 void set_always_restores_to_restore_bounds(bool value) { |
| 122 always_restores_to_restore_bounds_ = value; | 122 always_restores_to_restore_bounds_ = value; |
| 123 } | 123 } |
| 124 | 124 |
| 125 // Sets/gets the flag to use maximized mode instead of | |
| 126 // fullscreen. Used for V1 app which has custom window controls. | |
| 127 bool maximize_when_fullscreen() const { | |
|
pkotwicz
2013/10/25 05:16:18
We need to be careful as to how much we want to re
| |
| 128 return maximize_when_fullscreen_; | |
| 129 } | |
| 130 void set_maximize_when_fullscreen(bool value) { | |
| 131 maximize_when_fullscreen_ = value; | |
| 132 } | |
| 133 | |
| 134 // Sets/gets the flag to suppress the cross-fade animation for | |
| 135 // the transition to the fullscreen state. | |
| 136 bool animate_to_fullscreen() const { | |
| 137 return animate_to_fullscreen_; | |
| 138 } | |
| 139 void set_animate_to_fullscreen(bool value) { | |
| 140 animate_to_fullscreen_ = value; | |
| 141 } | |
| 142 | |
| 125 // Gets/Sets the bounds of the window before it was moved by the auto window | 143 // Gets/Sets the bounds of the window before it was moved by the auto window |
| 126 // management. As long as it was not auto-managed, it will return NULL. | 144 // management. As long as it was not auto-managed, it will return NULL. |
| 127 const gfx::Rect* pre_auto_manage_window_bounds() const { | 145 const gfx::Rect* pre_auto_manage_window_bounds() const { |
| 128 return pre_auto_manage_window_bounds_.get(); | 146 return pre_auto_manage_window_bounds_.get(); |
| 129 } | 147 } |
| 130 void SetPreAutoManageWindowBounds(const gfx::Rect& bounds); | 148 void SetPreAutoManageWindowBounds(const gfx::Rect& bounds); |
| 131 | 149 |
| 132 // Layout related properties | 150 // Layout related properties |
| 133 | 151 |
| 134 void AddObserver(WindowStateObserver* observer); | 152 void AddObserver(WindowStateObserver* observer); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 210 aura::Window* window_; | 228 aura::Window* window_; |
| 211 | 229 |
| 212 bool tracked_by_workspace_; | 230 bool tracked_by_workspace_; |
| 213 bool window_position_managed_; | 231 bool window_position_managed_; |
| 214 bool bounds_changed_by_user_; | 232 bool bounds_changed_by_user_; |
| 215 bool panel_attached_; | 233 bool panel_attached_; |
| 216 bool continue_drag_after_reparent_; | 234 bool continue_drag_after_reparent_; |
| 217 bool ignored_by_shelf_; | 235 bool ignored_by_shelf_; |
| 218 bool can_consume_system_keys_; | 236 bool can_consume_system_keys_; |
| 219 bool top_row_keys_are_function_keys_; | 237 bool top_row_keys_are_function_keys_; |
| 220 | |
| 221 bool always_restores_to_restore_bounds_; | 238 bool always_restores_to_restore_bounds_; |
| 239 bool maximize_when_fullscreen_; | |
| 240 bool animate_to_fullscreen_; | |
| 222 | 241 |
| 223 // A property to remember the window position which was set before the | 242 // A property to remember the window position which was set before the |
| 224 // auto window position manager changed the window bounds, so that it can get | 243 // auto window position manager changed the window bounds, so that it can get |
| 225 // restored when only this one window gets shown. | 244 // restored when only this one window gets shown. |
| 226 scoped_ptr<gfx::Rect> pre_auto_manage_window_bounds_; | 245 scoped_ptr<gfx::Rect> pre_auto_manage_window_bounds_; |
| 227 | 246 |
| 228 ObserverList<WindowStateObserver> observer_list_; | 247 ObserverList<WindowStateObserver> observer_list_; |
| 229 | 248 |
| 230 WindowShowType window_show_type_; | 249 WindowShowType window_show_type_; |
| 231 | 250 |
| 232 DISALLOW_COPY_AND_ASSIGN(WindowState); | 251 DISALLOW_COPY_AND_ASSIGN(WindowState); |
| 233 }; | 252 }; |
| 234 | 253 |
| 235 // Returns the WindowState for active window. Returns |NULL| | 254 // Returns the WindowState for active window. Returns |NULL| |
| 236 // if there is no active window. | 255 // if there is no active window. |
| 237 ASH_EXPORT WindowState* GetActiveWindowState(); | 256 ASH_EXPORT WindowState* GetActiveWindowState(); |
| 238 | 257 |
| 239 // Returns the WindowState for |window|. Creates WindowState | 258 // Returns the WindowState for |window|. Creates WindowState |
| 240 // if it didn't exist. The settings object is owned by |window|. | 259 // if it didn't exist. The settings object is owned by |window|. |
| 241 ASH_EXPORT WindowState* GetWindowState(aura::Window* window); | 260 ASH_EXPORT WindowState* GetWindowState(aura::Window* window); |
| 242 | 261 |
| 243 // const version of GetWindowState. | 262 // const version of GetWindowState. |
| 244 ASH_EXPORT const WindowState* | 263 ASH_EXPORT const WindowState* |
| 245 GetWindowState(const aura::Window* window); | 264 GetWindowState(const aura::Window* window); |
| 246 | 265 |
| 247 } // namespace wm | 266 } // namespace wm |
| 248 } // namespace ash | 267 } // namespace ash |
| 249 | 268 |
| 250 #endif // ASH_WM_WINDOW_STATE_H_ | 269 #endif // ASH_WM_WINDOW_STATE_H_ |
| OLD | NEW |