Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Side by Side Diff: ash/common/wm/window_state.h

Issue 2806783002: ash: Do not constrain window bounds if requested (Closed)
Patch Set: Fix tests Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 {
303 return allow_set_bounds_in_maximized_; 302 return allow_set_bounds_direct_;
304 } 303 }
305 304
306 // Creates and takes ownership of a pointer to DragDetails when resizing is 305 // Creates and takes ownership of a pointer to DragDetails when resizing is
307 // active. This should be done before a resizer gets created. 306 // active. This should be done before a resizer gets created.
308 void CreateDragDetails(const gfx::Point& point_in_parent, 307 void CreateDragDetails(const gfx::Point& point_in_parent,
309 int window_component, 308 int window_component,
310 aura::client::WindowMoveSource source); 309 aura::client::WindowMoveSource source);
311 310
312 // Deletes and clears a pointer to DragDetails. This should be done when the 311 // Deletes and clears a pointer to DragDetails. This should be done when the
313 // resizer gets destroyed. 312 // resizer gets destroyed.
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 std::unique_ptr<DragDetails> drag_details_; 388 std::unique_ptr<DragDetails> drag_details_;
390 389
391 bool unminimize_to_restore_bounds_; 390 bool unminimize_to_restore_bounds_;
392 bool in_immersive_fullscreen_; 391 bool in_immersive_fullscreen_;
393 bool ignore_keyboard_bounds_change_ = false; 392 bool ignore_keyboard_bounds_change_ = false;
394 bool hide_shelf_when_fullscreen_; 393 bool hide_shelf_when_fullscreen_;
395 bool autohide_shelf_when_maximized_or_fullscreen_; 394 bool autohide_shelf_when_maximized_or_fullscreen_;
396 bool minimum_visibility_; 395 bool minimum_visibility_;
397 bool can_be_dragged_; 396 bool can_be_dragged_;
398 bool cached_always_on_top_; 397 bool cached_always_on_top_;
399 bool allow_set_bounds_in_maximized_ = false; 398 bool allow_set_bounds_direct_ = false;
400 399
401 // A property to remember the window position which was set before the 400 // 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 401 // auto window position manager changed the window bounds, so that it can get
403 // restored when only this one window gets shown. 402 // restored when only this one window gets shown.
404 std::unique_ptr<gfx::Rect> pre_auto_manage_window_bounds_; 403 std::unique_ptr<gfx::Rect> pre_auto_manage_window_bounds_;
405 404
406 base::ObserverList<WindowStateObserver> observer_list_; 405 base::ObserverList<WindowStateObserver> observer_list_;
407 406
408 // True to ignore a property change event to avoid reentrance in 407 // True to ignore a property change event to avoid reentrance in
409 // UpdateWindowStateType() 408 // UpdateWindowStateType()
410 bool ignore_property_change_; 409 bool ignore_property_change_;
411 410
412 std::unique_ptr<State> current_state_; 411 std::unique_ptr<State> current_state_;
413 412
414 DISALLOW_COPY_AND_ASSIGN(WindowState); 413 DISALLOW_COPY_AND_ASSIGN(WindowState);
415 }; 414 };
416 415
417 } // namespace wm 416 } // namespace wm
418 } // namespace ash 417 } // namespace ash
419 418
420 #endif // ASH_COMMON_WM_WINDOW_STATE_H_ 419 #endif // ASH_COMMON_WM_WINDOW_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698