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

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

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

Powered by Google App Engine
This is Rietveld 408576698