| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 // virtual keyboard bounds changes. | 287 // virtual keyboard bounds changes. |
| 288 // TODO(oshima): This is hack. Replace this with proper | 288 // TODO(oshima): This is hack. Replace this with proper |
| 289 // implementation based on EnsureCaretNotInRect. | 289 // implementation based on EnsureCaretNotInRect. |
| 290 bool ignore_keyboard_bounds_change() const { | 290 bool ignore_keyboard_bounds_change() const { |
| 291 return ignore_keyboard_bounds_change_; | 291 return ignore_keyboard_bounds_change_; |
| 292 } | 292 } |
| 293 void set_ignore_keyboard_bounds_change(bool ignore_keyboard_bounds_change) { | 293 void set_ignore_keyboard_bounds_change(bool ignore_keyboard_bounds_change) { |
| 294 ignore_keyboard_bounds_change_ = ignore_keyboard_bounds_change; | 294 ignore_keyboard_bounds_change_ = ignore_keyboard_bounds_change; |
| 295 } | 295 } |
| 296 | 296 |
| 297 // True if the window's bounds can be updated using SET_BOUNDS event in | 297 // True if the window bounds can be updated directly using SET_BOUNDS event. |
| 298 // maiximzed/fullscreen mode. | 298 void set_allow_set_bounds_direct(bool value) { |
| 299 void set_allow_set_bounds_in_maximized(bool value) { | 299 allow_set_bounds_direct_ = value; |
| 300 allow_set_bounds_in_maximized_ = value; | |
| 301 } | 300 } |
| 302 bool allow_set_bounds_in_maximized() const { | 301 bool allow_set_bounds_direct() const { return allow_set_bounds_direct_; } |
| 303 return allow_set_bounds_in_maximized_; | |
| 304 } | |
| 305 | 302 |
| 306 // Creates and takes ownership of a pointer to DragDetails when resizing is | 303 // Creates and takes ownership of a pointer to DragDetails when resizing is |
| 307 // active. This should be done before a resizer gets created. | 304 // active. This should be done before a resizer gets created. |
| 308 void CreateDragDetails(const gfx::Point& point_in_parent, | 305 void CreateDragDetails(const gfx::Point& point_in_parent, |
| 309 int window_component, | 306 int window_component, |
| 310 aura::client::WindowMoveSource source); | 307 aura::client::WindowMoveSource source); |
| 311 | 308 |
| 312 // Deletes and clears a pointer to DragDetails. This should be done when the | 309 // Deletes and clears a pointer to DragDetails. This should be done when the |
| 313 // resizer gets destroyed. | 310 // resizer gets destroyed. |
| 314 void DeleteDragDetails(); | 311 void DeleteDragDetails(); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 std::unique_ptr<DragDetails> drag_details_; | 386 std::unique_ptr<DragDetails> drag_details_; |
| 390 | 387 |
| 391 bool unminimize_to_restore_bounds_; | 388 bool unminimize_to_restore_bounds_; |
| 392 bool in_immersive_fullscreen_; | 389 bool in_immersive_fullscreen_; |
| 393 bool ignore_keyboard_bounds_change_ = false; | 390 bool ignore_keyboard_bounds_change_ = false; |
| 394 bool hide_shelf_when_fullscreen_; | 391 bool hide_shelf_when_fullscreen_; |
| 395 bool autohide_shelf_when_maximized_or_fullscreen_; | 392 bool autohide_shelf_when_maximized_or_fullscreen_; |
| 396 bool minimum_visibility_; | 393 bool minimum_visibility_; |
| 397 bool can_be_dragged_; | 394 bool can_be_dragged_; |
| 398 bool cached_always_on_top_; | 395 bool cached_always_on_top_; |
| 399 bool allow_set_bounds_in_maximized_ = false; | 396 bool allow_set_bounds_direct_ = false; |
| 400 | 397 |
| 401 // A property to remember the window position which was set before the | 398 // A property to remember the window position which was set before the |
| 402 // auto window position manager changed the window bounds, so that it can get | 399 // auto window position manager changed the window bounds, so that it can get |
| 403 // restored when only this one window gets shown. | 400 // restored when only this one window gets shown. |
| 404 std::unique_ptr<gfx::Rect> pre_auto_manage_window_bounds_; | 401 std::unique_ptr<gfx::Rect> pre_auto_manage_window_bounds_; |
| 405 | 402 |
| 406 base::ObserverList<WindowStateObserver> observer_list_; | 403 base::ObserverList<WindowStateObserver> observer_list_; |
| 407 | 404 |
| 408 // True to ignore a property change event to avoid reentrance in | 405 // True to ignore a property change event to avoid reentrance in |
| 409 // UpdateWindowStateType() | 406 // UpdateWindowStateType() |
| 410 bool ignore_property_change_; | 407 bool ignore_property_change_; |
| 411 | 408 |
| 412 std::unique_ptr<State> current_state_; | 409 std::unique_ptr<State> current_state_; |
| 413 | 410 |
| 414 DISALLOW_COPY_AND_ASSIGN(WindowState); | 411 DISALLOW_COPY_AND_ASSIGN(WindowState); |
| 415 }; | 412 }; |
| 416 | 413 |
| 417 } // namespace wm | 414 } // namespace wm |
| 418 } // namespace ash | 415 } // namespace ash |
| 419 | 416 |
| 420 #endif // ASH_WM_WINDOW_STATE_H_ | 417 #endif // ASH_WM_WINDOW_STATE_H_ |
| OLD | NEW |