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_COMMON_WM_WINDOW_STATE_H_ | 5 #ifndef ASH_COMMON_WM_WINDOW_STATE_H_ |
6 #define ASH_COMMON_WM_WINDOW_STATE_H_ | 6 #define ASH_COMMON_WM_WINDOW_STATE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 // True if the window should be unminimized to the restore bounds, as | 189 // True if the window should be unminimized to the restore bounds, as |
190 // opposed to the window's current bounds. |unminimized_to_restore_bounds_| is | 190 // opposed to the window's current bounds. |unminimized_to_restore_bounds_| is |
191 // reset to the default value after the window is unminimized. | 191 // reset to the default value after the window is unminimized. |
192 bool unminimize_to_restore_bounds() const { | 192 bool unminimize_to_restore_bounds() const { |
193 return unminimize_to_restore_bounds_; | 193 return unminimize_to_restore_bounds_; |
194 } | 194 } |
195 void set_unminimize_to_restore_bounds(bool value) { | 195 void set_unminimize_to_restore_bounds(bool value) { |
196 unminimize_to_restore_bounds_ = value; | 196 unminimize_to_restore_bounds_ = value; |
197 } | 197 } |
198 | 198 |
199 // Controls the shelf mode when this window is in fullscreen state. | |
200 // This enum is temporary until MD immersive is launched. | |
201 // TODO(oshima): Remove this when MD immersive is launched. | |
202 enum FullscreenShelfMode { | |
203 SHELF_HIDDEN, | |
204 SHELF_AUTO_HIDE_VISIBLE, | |
205 SHELF_AUTO_HIDE_INVISIBLE, | |
206 }; | |
207 // Gets/sets whether the shelf should be hidden when this window is | 199 // Gets/sets whether the shelf should be hidden when this window is |
208 // fullscreen. | 200 // fullscreen. |
209 FullscreenShelfMode shelf_mode_in_fullscreen() const { | 201 bool hide_shelf_when_fullscreen() const { |
210 return shelf_mode_in_fullscreen_; | 202 return hide_shelf_when_fullscreen_; |
211 } | 203 } |
212 void set_shelf_mode_in_fullscreen(FullscreenShelfMode value) { | 204 |
213 shelf_mode_in_fullscreen_ = value; | 205 void set_hide_shelf_when_fullscreen(bool value) { |
| 206 hide_shelf_when_fullscreen_ = value; |
214 } | 207 } |
215 | 208 |
216 // If the minimum visibility is true, ash will try to keep a | 209 // If the minimum visibility is true, ash will try to keep a |
217 // minimum amount of the window is always visible on the work area | 210 // minimum amount of the window is always visible on the work area |
218 // when shown. | 211 // when shown. |
219 // TODO(oshima): Consolidate this and window_position_managed | 212 // TODO(oshima): Consolidate this and window_position_managed |
220 // into single parameter to control the window placement. | 213 // into single parameter to control the window placement. |
221 bool minimum_visibility() const { return minimum_visibility_; } | 214 bool minimum_visibility() const { return minimum_visibility_; } |
222 void set_minimum_visibility(bool minimum_visibility) { | 215 void set_minimum_visibility(bool minimum_visibility) { |
223 minimum_visibility_ = minimum_visibility; | 216 minimum_visibility_ = minimum_visibility; |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 bool window_position_managed_; | 373 bool window_position_managed_; |
381 bool bounds_changed_by_user_; | 374 bool bounds_changed_by_user_; |
382 bool panel_attached_; | 375 bool panel_attached_; |
383 bool ignored_by_shelf_; | 376 bool ignored_by_shelf_; |
384 bool can_consume_system_keys_; | 377 bool can_consume_system_keys_; |
385 std::unique_ptr<DragDetails> drag_details_; | 378 std::unique_ptr<DragDetails> drag_details_; |
386 | 379 |
387 bool unminimize_to_restore_bounds_; | 380 bool unminimize_to_restore_bounds_; |
388 bool in_immersive_fullscreen_; | 381 bool in_immersive_fullscreen_; |
389 bool ignore_keyboard_bounds_change_ = false; | 382 bool ignore_keyboard_bounds_change_ = false; |
390 FullscreenShelfMode shelf_mode_in_fullscreen_ = SHELF_HIDDEN; | 383 bool hide_shelf_when_fullscreen_; |
391 bool minimum_visibility_; | 384 bool minimum_visibility_; |
392 bool can_be_dragged_; | 385 bool can_be_dragged_; |
393 bool cached_always_on_top_; | 386 bool cached_always_on_top_; |
394 bool allow_set_bounds_in_maximized_ = false; | 387 bool allow_set_bounds_in_maximized_ = false; |
395 | 388 |
396 // A property to remember the window position which was set before the | 389 // A property to remember the window position which was set before the |
397 // auto window position manager changed the window bounds, so that it can get | 390 // auto window position manager changed the window bounds, so that it can get |
398 // restored when only this one window gets shown. | 391 // restored when only this one window gets shown. |
399 std::unique_ptr<gfx::Rect> pre_auto_manage_window_bounds_; | 392 std::unique_ptr<gfx::Rect> pre_auto_manage_window_bounds_; |
400 | 393 |
401 base::ObserverList<WindowStateObserver> observer_list_; | 394 base::ObserverList<WindowStateObserver> observer_list_; |
402 | 395 |
403 // True to ignore a property change event to avoid reentrance in | 396 // True to ignore a property change event to avoid reentrance in |
404 // UpdateWindowStateType() | 397 // UpdateWindowStateType() |
405 bool ignore_property_change_; | 398 bool ignore_property_change_; |
406 | 399 |
407 std::unique_ptr<State> current_state_; | 400 std::unique_ptr<State> current_state_; |
408 | 401 |
409 DISALLOW_COPY_AND_ASSIGN(WindowState); | 402 DISALLOW_COPY_AND_ASSIGN(WindowState); |
410 }; | 403 }; |
411 | 404 |
412 } // namespace wm | 405 } // namespace wm |
413 } // namespace ash | 406 } // namespace ash |
414 | 407 |
415 #endif // ASH_COMMON_WM_WINDOW_STATE_H_ | 408 #endif // ASH_COMMON_WM_WINDOW_STATE_H_ |
OLD | NEW |