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

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

Issue 2822613004: [M58] ash: Do not constrain window bounds if requested (Closed)
Patch Set: 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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 // virtual keyboard bounds changes. 284 // virtual keyboard bounds changes.
285 // TODO(oshima): This is hack. Replace this with proper 285 // TODO(oshima): This is hack. Replace this with proper
286 // implementation based on EnsureCaretNotInRect. 286 // implementation based on EnsureCaretNotInRect.
287 bool ignore_keyboard_bounds_change() const { 287 bool ignore_keyboard_bounds_change() const {
288 return ignore_keyboard_bounds_change_; 288 return ignore_keyboard_bounds_change_;
289 } 289 }
290 void set_ignore_keyboard_bounds_change(bool ignore_keyboard_bounds_change) { 290 void set_ignore_keyboard_bounds_change(bool ignore_keyboard_bounds_change) {
291 ignore_keyboard_bounds_change_ = ignore_keyboard_bounds_change; 291 ignore_keyboard_bounds_change_ = ignore_keyboard_bounds_change;
292 } 292 }
293 293
294 // True if the window's bounds can be updated using SET_BOUNDS event in 294 // True if the window bounds can be updated directly using SET_BOUNDS event.
295 // maiximzed/fullscreen mode. 295 void set_allow_set_bounds_direct(bool value) {
296 void set_allow_set_bounds_in_maximized(bool value) { 296 allow_set_bounds_direct_ = value;
297 allow_set_bounds_in_maximized_ = value;
298 } 297 }
299 bool allow_set_bounds_in_maximized() const { 298 bool allow_set_bounds_direct() const { return allow_set_bounds_direct_; }
300 return allow_set_bounds_in_maximized_;
301 }
302 299
303 // Creates and takes ownership of a pointer to DragDetails when resizing is 300 // Creates and takes ownership of a pointer to DragDetails when resizing is
304 // active. This should be done before a resizer gets created. 301 // active. This should be done before a resizer gets created.
305 void CreateDragDetails(const gfx::Point& point_in_parent, 302 void CreateDragDetails(const gfx::Point& point_in_parent,
306 int window_component, 303 int window_component,
307 aura::client::WindowMoveSource source); 304 aura::client::WindowMoveSource source);
308 305
309 // Deletes and clears a pointer to DragDetails. This should be done when the 306 // Deletes and clears a pointer to DragDetails. This should be done when the
310 // resizer gets destroyed. 307 // resizer gets destroyed.
311 void DeleteDragDetails(); 308 void DeleteDragDetails();
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 std::unique_ptr<DragDetails> drag_details_; 376 std::unique_ptr<DragDetails> drag_details_;
380 377
381 bool unminimize_to_restore_bounds_; 378 bool unminimize_to_restore_bounds_;
382 bool in_immersive_fullscreen_; 379 bool in_immersive_fullscreen_;
383 bool ignore_keyboard_bounds_change_ = false; 380 bool ignore_keyboard_bounds_change_ = false;
384 bool hide_shelf_when_fullscreen_; 381 bool hide_shelf_when_fullscreen_;
385 bool autohide_shelf_when_maximized_or_fullscreen_; 382 bool autohide_shelf_when_maximized_or_fullscreen_;
386 bool minimum_visibility_; 383 bool minimum_visibility_;
387 bool can_be_dragged_; 384 bool can_be_dragged_;
388 bool cached_always_on_top_; 385 bool cached_always_on_top_;
389 bool allow_set_bounds_in_maximized_ = false; 386 bool allow_set_bounds_direct_ = false;
390 387
391 // A property to remember the window position which was set before the 388 // A property to remember the window position which was set before the
392 // auto window position manager changed the window bounds, so that it can get 389 // auto window position manager changed the window bounds, so that it can get
393 // restored when only this one window gets shown. 390 // restored when only this one window gets shown.
394 std::unique_ptr<gfx::Rect> pre_auto_manage_window_bounds_; 391 std::unique_ptr<gfx::Rect> pre_auto_manage_window_bounds_;
395 392
396 base::ObserverList<WindowStateObserver> observer_list_; 393 base::ObserverList<WindowStateObserver> observer_list_;
397 394
398 // True to ignore a property change event to avoid reentrance in 395 // True to ignore a property change event to avoid reentrance in
399 // UpdateWindowStateType() 396 // UpdateWindowStateType()
400 bool ignore_property_change_; 397 bool ignore_property_change_;
401 398
402 std::unique_ptr<State> current_state_; 399 std::unique_ptr<State> current_state_;
403 400
404 DISALLOW_COPY_AND_ASSIGN(WindowState); 401 DISALLOW_COPY_AND_ASSIGN(WindowState);
405 }; 402 };
406 403
407 } // namespace wm 404 } // namespace wm
408 } // namespace ash 405 } // namespace ash
409 406
410 #endif // ASH_COMMON_WM_WINDOW_STATE_H_ 407 #endif // ASH_COMMON_WM_WINDOW_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698