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

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

Issue 2782223002: Add ability to have active window autohide shelf (Closed)
Patch Set: Rebase 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 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 autohidden when this window is
205 // fullscreen or active.
206 // Note: if true, this will override the logic controlled by
207 // hide_shelf_when_fullscreen.
208 bool autohide_shelf_when_maximized_or_fullscreen() const {
209 return autohide_shelf_when_maximized_or_fullscreen_;
210 }
211
212 void set_autohide_shelf_when_maximized_or_fullscreen(bool value) {
213 autohide_shelf_when_maximized_or_fullscreen_ = value;
214 }
215
204 // 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
205 // 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
206 // when shown. 218 // when shown.
207 // TODO(oshima): Consolidate this and window_position_managed 219 // TODO(oshima): Consolidate this and window_position_managed
208 // into single parameter to control the window placement. 220 // into single parameter to control the window placement.
209 bool minimum_visibility() const { return minimum_visibility_; } 221 bool minimum_visibility() const { return minimum_visibility_; }
210 void set_minimum_visibility(bool minimum_visibility) { 222 void set_minimum_visibility(bool minimum_visibility) {
211 minimum_visibility_ = minimum_visibility; 223 minimum_visibility_ = minimum_visibility;
212 } 224 }
213 225
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 bool window_position_managed_; 374 bool window_position_managed_;
363 bool bounds_changed_by_user_; 375 bool bounds_changed_by_user_;
364 bool ignored_by_shelf_; 376 bool ignored_by_shelf_;
365 bool can_consume_system_keys_; 377 bool can_consume_system_keys_;
366 std::unique_ptr<DragDetails> drag_details_; 378 std::unique_ptr<DragDetails> drag_details_;
367 379
368 bool unminimize_to_restore_bounds_; 380 bool unminimize_to_restore_bounds_;
369 bool in_immersive_fullscreen_; 381 bool in_immersive_fullscreen_;
370 bool ignore_keyboard_bounds_change_ = false; 382 bool ignore_keyboard_bounds_change_ = false;
371 bool hide_shelf_when_fullscreen_; 383 bool hide_shelf_when_fullscreen_;
384 bool autohide_shelf_when_maximized_or_fullscreen_;
372 bool minimum_visibility_; 385 bool minimum_visibility_;
373 bool can_be_dragged_; 386 bool can_be_dragged_;
374 bool cached_always_on_top_; 387 bool cached_always_on_top_;
375 bool allow_set_bounds_in_maximized_ = false; 388 bool allow_set_bounds_in_maximized_ = false;
376 389
377 // A property to remember the window position which was set before the 390 // 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 391 // auto window position manager changed the window bounds, so that it can get
379 // restored when only this one window gets shown. 392 // restored when only this one window gets shown.
380 std::unique_ptr<gfx::Rect> pre_auto_manage_window_bounds_; 393 std::unique_ptr<gfx::Rect> pre_auto_manage_window_bounds_;
381 394
382 base::ObserverList<WindowStateObserver> observer_list_; 395 base::ObserverList<WindowStateObserver> observer_list_;
383 396
384 // True to ignore a property change event to avoid reentrance in 397 // True to ignore a property change event to avoid reentrance in
385 // UpdateWindowStateType() 398 // UpdateWindowStateType()
386 bool ignore_property_change_; 399 bool ignore_property_change_;
387 400
388 std::unique_ptr<State> current_state_; 401 std::unique_ptr<State> current_state_;
389 402
390 DISALLOW_COPY_AND_ASSIGN(WindowState); 403 DISALLOW_COPY_AND_ASSIGN(WindowState);
391 }; 404 };
392 405
393 } // namespace wm 406 } // namespace wm
394 } // namespace ash 407 } // namespace ash
395 408
396 #endif // ASH_COMMON_WM_WINDOW_STATE_H_ 409 #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