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 // TODO(oshima): Remove this when MD ash is launched. | |
201 enum FullscreenShelfMode { | |
202 SHELF_HIDDEN, | |
203 SHELF_AUTO_HIDE_VISIBLE, | |
204 SHELF_AUTO_HIDE_INVISIBLE, | |
tdanderson
2016/08/15 19:51:37
Can you include a brief comment to explain that SH
oshima
2016/08/15 20:01:50
I ipdated the enum comment because this enum will
| |
205 }; | |
199 // Gets/sets whether the shelf should be hidden when this window is | 206 // Gets/sets whether the shelf should be hidden when this window is |
200 // fullscreen. | 207 // fullscreen. |
201 bool hide_shelf_when_fullscreen() const { | 208 FullscreenShelfMode shelf_mode_in_fullscreen() const { |
202 return hide_shelf_when_fullscreen_; | 209 return shelf_mode_in_fullscreen_; // hide_shelf_when_fullscreen_; |
tdanderson
2016/08/15 19:51:37
Comment left over from debugging?
oshima
2016/08/15 20:01:50
Done.
| |
203 } | 210 } |
204 | 211 void set_shelf_mode_in_fullscreen(FullscreenShelfMode value) { |
205 void set_hide_shelf_when_fullscreen(bool value) { | 212 shelf_mode_in_fullscreen_ = value; |
206 hide_shelf_when_fullscreen_ = value; | |
207 } | 213 } |
208 | 214 |
209 // If the minimum visibility is true, ash will try to keep a | 215 // If the minimum visibility is true, ash will try to keep a |
210 // minimum amount of the window is always visible on the work area | 216 // minimum amount of the window is always visible on the work area |
211 // when shown. | 217 // when shown. |
212 // TODO(oshima): Consolidate this and window_position_managed | 218 // TODO(oshima): Consolidate this and window_position_managed |
213 // into single parameter to control the window placement. | 219 // into single parameter to control the window placement. |
214 bool minimum_visibility() const { return minimum_visibility_; } | 220 bool minimum_visibility() const { return minimum_visibility_; } |
215 void set_minimum_visibility(bool minimum_visibility) { | 221 void set_minimum_visibility(bool minimum_visibility) { |
216 minimum_visibility_ = minimum_visibility; | 222 minimum_visibility_ = minimum_visibility; |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
364 bool window_position_managed_; | 370 bool window_position_managed_; |
365 bool bounds_changed_by_user_; | 371 bool bounds_changed_by_user_; |
366 bool panel_attached_; | 372 bool panel_attached_; |
367 bool ignored_by_shelf_; | 373 bool ignored_by_shelf_; |
368 bool can_consume_system_keys_; | 374 bool can_consume_system_keys_; |
369 std::unique_ptr<DragDetails> drag_details_; | 375 std::unique_ptr<DragDetails> drag_details_; |
370 | 376 |
371 bool unminimize_to_restore_bounds_; | 377 bool unminimize_to_restore_bounds_; |
372 bool in_immersive_fullscreen_; | 378 bool in_immersive_fullscreen_; |
373 bool ignore_keyboard_bounds_change_ = false; | 379 bool ignore_keyboard_bounds_change_ = false; |
374 bool hide_shelf_when_fullscreen_; | 380 FullscreenShelfMode shelf_mode_in_fullscreen_ = SHELF_HIDDEN; |
375 bool minimum_visibility_; | 381 bool minimum_visibility_; |
376 bool can_be_dragged_; | 382 bool can_be_dragged_; |
377 bool cached_always_on_top_; | 383 bool cached_always_on_top_; |
378 | 384 |
379 // A property to remember the window position which was set before the | 385 // A property to remember the window position which was set before the |
380 // auto window position manager changed the window bounds, so that it can get | 386 // auto window position manager changed the window bounds, so that it can get |
381 // restored when only this one window gets shown. | 387 // restored when only this one window gets shown. |
382 std::unique_ptr<gfx::Rect> pre_auto_manage_window_bounds_; | 388 std::unique_ptr<gfx::Rect> pre_auto_manage_window_bounds_; |
383 | 389 |
384 base::ObserverList<WindowStateObserver> observer_list_; | 390 base::ObserverList<WindowStateObserver> observer_list_; |
385 | 391 |
386 // True to ignore a property change event to avoid reentrance in | 392 // True to ignore a property change event to avoid reentrance in |
387 // UpdateWindowStateType() | 393 // UpdateWindowStateType() |
388 bool ignore_property_change_; | 394 bool ignore_property_change_; |
389 | 395 |
390 std::unique_ptr<State> current_state_; | 396 std::unique_ptr<State> current_state_; |
391 | 397 |
392 DISALLOW_COPY_AND_ASSIGN(WindowState); | 398 DISALLOW_COPY_AND_ASSIGN(WindowState); |
393 }; | 399 }; |
394 | 400 |
395 } // namespace wm | 401 } // namespace wm |
396 } // namespace ash | 402 } // namespace ash |
397 | 403 |
398 #endif // ASH_COMMON_WM_WINDOW_STATE_H_ | 404 #endif // ASH_COMMON_WM_WINDOW_STATE_H_ |
OLD | NEW |