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

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

Issue 2790943003: Add ability to have active window autohide shelf (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
« no previous file with comments | « ash/common/shelf/shelf_layout_manager.cc ('k') | 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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 // Gets/sets whether the shelf should be hidden when this window is 195 // Gets/sets whether the shelf should be hidden when this window is
196 // fullscreen. 196 // fullscreen.
197 bool hide_shelf_when_fullscreen() const { 197 bool hide_shelf_when_fullscreen() const {
198 return hide_shelf_when_fullscreen_; 198 return hide_shelf_when_fullscreen_;
199 } 199 }
200 200
201 void set_hide_shelf_when_fullscreen(bool value) { 201 void set_hide_shelf_when_fullscreen(bool value) {
202 hide_shelf_when_fullscreen_ = value; 202 hide_shelf_when_fullscreen_ = value;
203 } 203 }
204 204
205 // Gets/sets whether the shelf should be autohidden when this window is
206 // fullscreen or active.
207 // Note: if true, this will override the logic controlled by
208 // hide_shelf_when_fullscreen.
209 bool autohide_shelf_when_maximized_or_fullscreen() const {
210 return autohide_shelf_when_maximized_or_fullscreen_;
211 }
212
213 void set_autohide_shelf_when_maximized_or_fullscreen(bool value) {
214 autohide_shelf_when_maximized_or_fullscreen_ = value;
215 }
216
205 // If the minimum visibility is true, ash will try to keep a 217 // If the minimum visibility is true, ash will try to keep a
206 // minimum amount of the window is always visible on the work area 218 // minimum amount of the window is always visible on the work area
207 // when shown. 219 // when shown.
208 // TODO(oshima): Consolidate this and window_position_managed 220 // TODO(oshima): Consolidate this and window_position_managed
209 // into single parameter to control the window placement. 221 // into single parameter to control the window placement.
210 bool minimum_visibility() const { return minimum_visibility_; } 222 bool minimum_visibility() const { return minimum_visibility_; }
211 void set_minimum_visibility(bool minimum_visibility) { 223 void set_minimum_visibility(bool minimum_visibility) {
212 minimum_visibility_ = minimum_visibility; 224 minimum_visibility_ = minimum_visibility;
213 } 225 }
214 226
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 bool window_position_managed_; 375 bool window_position_managed_;
364 bool bounds_changed_by_user_; 376 bool bounds_changed_by_user_;
365 bool ignored_by_shelf_; 377 bool ignored_by_shelf_;
366 bool can_consume_system_keys_; 378 bool can_consume_system_keys_;
367 std::unique_ptr<DragDetails> drag_details_; 379 std::unique_ptr<DragDetails> drag_details_;
368 380
369 bool unminimize_to_restore_bounds_; 381 bool unminimize_to_restore_bounds_;
370 bool in_immersive_fullscreen_; 382 bool in_immersive_fullscreen_;
371 bool ignore_keyboard_bounds_change_ = false; 383 bool ignore_keyboard_bounds_change_ = false;
372 bool hide_shelf_when_fullscreen_; 384 bool hide_shelf_when_fullscreen_;
385 bool autohide_shelf_when_maximized_or_fullscreen_;
373 bool minimum_visibility_; 386 bool minimum_visibility_;
374 bool can_be_dragged_; 387 bool can_be_dragged_;
375 bool cached_always_on_top_; 388 bool cached_always_on_top_;
376 bool allow_set_bounds_in_maximized_ = false; 389 bool allow_set_bounds_in_maximized_ = false;
377 390
378 // A property to remember the window position which was set before the 391 // A property to remember the window position which was set before the
379 // auto window position manager changed the window bounds, so that it can get 392 // auto window position manager changed the window bounds, so that it can get
380 // restored when only this one window gets shown. 393 // restored when only this one window gets shown.
381 std::unique_ptr<gfx::Rect> pre_auto_manage_window_bounds_; 394 std::unique_ptr<gfx::Rect> pre_auto_manage_window_bounds_;
382 395
383 base::ObserverList<WindowStateObserver> observer_list_; 396 base::ObserverList<WindowStateObserver> observer_list_;
384 397
385 // True to ignore a property change event to avoid reentrance in 398 // True to ignore a property change event to avoid reentrance in
386 // UpdateWindowStateType() 399 // UpdateWindowStateType()
387 bool ignore_property_change_; 400 bool ignore_property_change_;
388 401
389 std::unique_ptr<State> current_state_; 402 std::unique_ptr<State> current_state_;
390 403
391 DISALLOW_COPY_AND_ASSIGN(WindowState); 404 DISALLOW_COPY_AND_ASSIGN(WindowState);
392 }; 405 };
393 406
394 } // namespace wm 407 } // namespace wm
395 } // namespace ash 408 } // namespace ash
396 409
397 #endif // ASH_COMMON_WM_WINDOW_STATE_H_ 410 #endif // ASH_COMMON_WM_WINDOW_STATE_H_
OLDNEW
« no previous file with comments | « ash/common/shelf/shelf_layout_manager.cc ('k') | ash/common/wm/window_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698