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

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

Issue 2248773002: Use MD-ash's auto hide behavior for arc++ windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add ash/shell.h bac to merge to m53 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
« no previous file with comments | « no previous file | ash/common/wm/window_state.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // This enum is temporary until MD immersive is launched.
201 // TODO(oshima): Remove this when MD immersive is launched.
202 enum FullscreenShelfMode {
203 SHELF_HIDDEN,
204 SHELF_AUTO_HIDE_VISIBLE,
205 SHELF_AUTO_HIDE_INVISIBLE,
206 };
199 // Gets/sets whether the shelf should be hidden when this window is 207 // Gets/sets whether the shelf should be hidden when this window is
200 // fullscreen. 208 // fullscreen.
201 bool hide_shelf_when_fullscreen() const { 209 FullscreenShelfMode shelf_mode_in_fullscreen() const {
202 return hide_shelf_when_fullscreen_; 210 return shelf_mode_in_fullscreen_;
203 } 211 }
204 212 void set_shelf_mode_in_fullscreen(FullscreenShelfMode value) {
205 void set_hide_shelf_when_fullscreen(bool value) { 213 shelf_mode_in_fullscreen_ = value;
206 hide_shelf_when_fullscreen_ = value;
207 } 214 }
208 215
209 // If the minimum visibility is true, ash will try to keep a 216 // 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 217 // minimum amount of the window is always visible on the work area
211 // when shown. 218 // when shown.
212 // TODO(oshima): Consolidate this and window_position_managed 219 // TODO(oshima): Consolidate this and window_position_managed
213 // into single parameter to control the window placement. 220 // into single parameter to control the window placement.
214 bool minimum_visibility() const { return minimum_visibility_; } 221 bool minimum_visibility() const { return minimum_visibility_; }
215 void set_minimum_visibility(bool minimum_visibility) { 222 void set_minimum_visibility(bool minimum_visibility) {
216 minimum_visibility_ = minimum_visibility; 223 minimum_visibility_ = minimum_visibility;
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 bool window_position_managed_; 380 bool window_position_managed_;
374 bool bounds_changed_by_user_; 381 bool bounds_changed_by_user_;
375 bool panel_attached_; 382 bool panel_attached_;
376 bool ignored_by_shelf_; 383 bool ignored_by_shelf_;
377 bool can_consume_system_keys_; 384 bool can_consume_system_keys_;
378 std::unique_ptr<DragDetails> drag_details_; 385 std::unique_ptr<DragDetails> drag_details_;
379 386
380 bool unminimize_to_restore_bounds_; 387 bool unminimize_to_restore_bounds_;
381 bool in_immersive_fullscreen_; 388 bool in_immersive_fullscreen_;
382 bool ignore_keyboard_bounds_change_ = false; 389 bool ignore_keyboard_bounds_change_ = false;
383 bool hide_shelf_when_fullscreen_; 390 FullscreenShelfMode shelf_mode_in_fullscreen_ = SHELF_HIDDEN;
384 bool minimum_visibility_; 391 bool minimum_visibility_;
385 bool can_be_dragged_; 392 bool can_be_dragged_;
386 bool cached_always_on_top_; 393 bool cached_always_on_top_;
387 bool allow_set_bounds_in_maximized_ = false; 394 bool allow_set_bounds_in_maximized_ = false;
388 395
389 // A property to remember the window position which was set before the 396 // A property to remember the window position which was set before the
390 // auto window position manager changed the window bounds, so that it can get 397 // auto window position manager changed the window bounds, so that it can get
391 // restored when only this one window gets shown. 398 // restored when only this one window gets shown.
392 std::unique_ptr<gfx::Rect> pre_auto_manage_window_bounds_; 399 std::unique_ptr<gfx::Rect> pre_auto_manage_window_bounds_;
393 400
394 base::ObserverList<WindowStateObserver> observer_list_; 401 base::ObserverList<WindowStateObserver> observer_list_;
395 402
396 // True to ignore a property change event to avoid reentrance in 403 // True to ignore a property change event to avoid reentrance in
397 // UpdateWindowStateType() 404 // UpdateWindowStateType()
398 bool ignore_property_change_; 405 bool ignore_property_change_;
399 406
400 std::unique_ptr<State> current_state_; 407 std::unique_ptr<State> current_state_;
401 408
402 DISALLOW_COPY_AND_ASSIGN(WindowState); 409 DISALLOW_COPY_AND_ASSIGN(WindowState);
403 }; 410 };
404 411
405 } // namespace wm 412 } // namespace wm
406 } // namespace ash 413 } // namespace ash
407 414
408 #endif // ASH_COMMON_WM_WINDOW_STATE_H_ 415 #endif // ASH_COMMON_WM_WINDOW_STATE_H_
OLDNEW
« no previous file with comments | « no previous file | ash/common/wm/window_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698