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

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

Issue 2237983002: Allow updating arc widget bounds in maximize/fullscreen state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 // virtual keyboard bounds changes. 282 // virtual keyboard bounds changes.
283 // TODO(oshima): This is hack. Replace this with proper 283 // TODO(oshima): This is hack. Replace this with proper
284 // implementation based on EnsureCaretInRect. 284 // implementation based on EnsureCaretInRect.
285 bool ignore_keyboard_bounds_change() const { 285 bool ignore_keyboard_bounds_change() const {
286 return ignore_keyboard_bounds_change_; 286 return ignore_keyboard_bounds_change_;
287 } 287 }
288 void set_ignore_keyboard_bounds_change(bool ignore_keyboard_bounds_change) { 288 void set_ignore_keyboard_bounds_change(bool ignore_keyboard_bounds_change) {
289 ignore_keyboard_bounds_change_ = ignore_keyboard_bounds_change; 289 ignore_keyboard_bounds_change_ = ignore_keyboard_bounds_change;
290 } 290 }
291 291
292 // True if the window's bounds can be updated using SET_BOUNDS event in
293 // maiximzed/fullscreen mode.
294 void set_allow_set_bounds_in_maximized(bool value) {
295 allow_set_bounds_in_maximized_ = true;
reveman 2016/08/11 19:07:25 "allow_set_bounds_in_maximized_ = value;" ?
oshima 2016/08/11 20:58:56 Oops, thanks for the catch. Done and added test ca
296 }
297 bool allow_set_bounds_in_maximized() const {
298 return allow_set_bounds_in_maximized_;
299 }
300
292 // Creates and takes ownership of a pointer to DragDetails when resizing is 301 // Creates and takes ownership of a pointer to DragDetails when resizing is
293 // active. This should be done before a resizer gets created. 302 // active. This should be done before a resizer gets created.
294 void CreateDragDetails(const gfx::Point& point_in_parent, 303 void CreateDragDetails(const gfx::Point& point_in_parent,
295 int window_component, 304 int window_component,
296 aura::client::WindowMoveSource source); 305 aura::client::WindowMoveSource source);
297 306
298 // Deletes and clears a pointer to DragDetails. This should be done when the 307 // Deletes and clears a pointer to DragDetails. This should be done when the
299 // resizer gets destroyed. 308 // resizer gets destroyed.
300 void DeleteDragDetails(); 309 void DeleteDragDetails();
301 310
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 bool can_consume_system_keys_; 377 bool can_consume_system_keys_;
369 std::unique_ptr<DragDetails> drag_details_; 378 std::unique_ptr<DragDetails> drag_details_;
370 379
371 bool unminimize_to_restore_bounds_; 380 bool unminimize_to_restore_bounds_;
372 bool in_immersive_fullscreen_; 381 bool in_immersive_fullscreen_;
373 bool ignore_keyboard_bounds_change_ = false; 382 bool ignore_keyboard_bounds_change_ = false;
374 bool hide_shelf_when_fullscreen_; 383 bool hide_shelf_when_fullscreen_;
375 bool minimum_visibility_; 384 bool minimum_visibility_;
376 bool can_be_dragged_; 385 bool can_be_dragged_;
377 bool cached_always_on_top_; 386 bool cached_always_on_top_;
387 bool allow_set_bounds_in_maximized_ = false;
reveman 2016/08/11 19:07:25 it's a bit confusing that this is false by default
oshima 2016/08/11 20:58:56 Maximized state means it's always maximized to its
378 388
379 // 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
380 // 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
381 // restored when only this one window gets shown. 391 // restored when only this one window gets shown.
382 std::unique_ptr<gfx::Rect> pre_auto_manage_window_bounds_; 392 std::unique_ptr<gfx::Rect> pre_auto_manage_window_bounds_;
383 393
384 base::ObserverList<WindowStateObserver> observer_list_; 394 base::ObserverList<WindowStateObserver> observer_list_;
385 395
386 // True to ignore a property change event to avoid reentrance in 396 // True to ignore a property change event to avoid reentrance in
387 // UpdateWindowStateType() 397 // UpdateWindowStateType()
388 bool ignore_property_change_; 398 bool ignore_property_change_;
389 399
390 std::unique_ptr<State> current_state_; 400 std::unique_ptr<State> current_state_;
391 401
392 DISALLOW_COPY_AND_ASSIGN(WindowState); 402 DISALLOW_COPY_AND_ASSIGN(WindowState);
393 }; 403 };
394 404
395 } // namespace wm 405 } // namespace wm
396 } // namespace ash 406 } // namespace ash
397 407
398 #endif // ASH_COMMON_WM_WINDOW_STATE_H_ 408 #endif // ASH_COMMON_WM_WINDOW_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698