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

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

Issue 55303006: Make sure the non browser/non app widget is fully visible when created on ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « ash/wm/window_positioner_unittest.cc ('k') | ash/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_WM_WINDOW_STATE_H_ 5 #ifndef ASH_WM_WINDOW_STATE_H_
6 #define ASH_WM_WINDOW_STATE_H_ 6 #define ASH_WM_WINDOW_STATE_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/wm/wm_types.h" 9 #include "ash/wm/wm_types.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 // Sets/gets the flag to suppress the cross-fade animation for 142 // Sets/gets the flag to suppress the cross-fade animation for
143 // the transition to the fullscreen state. 143 // the transition to the fullscreen state.
144 bool animate_to_fullscreen() const { 144 bool animate_to_fullscreen() const {
145 return animate_to_fullscreen_; 145 return animate_to_fullscreen_;
146 } 146 }
147 void set_animate_to_fullscreen(bool value) { 147 void set_animate_to_fullscreen(bool value) {
148 animate_to_fullscreen_ = value; 148 animate_to_fullscreen_ = value;
149 } 149 }
150 150
151 // If the minimum visibilty is true, ash will try to keep a
152 // minimum amount of the window is always visible on the work area
153 // when shown.
154 // TODO(oshima): Consolidate this and window_position_managed
155 // into single parameter to control the window placement.
156 bool minimum_visibility() const {
157 return minimum_visibility_;
158 }
159 void set_minimum_visibility(bool minimum_visibility) {
160 minimum_visibility_ = minimum_visibility;
161 }
162
151 // Gets/Sets the bounds of the window before it was moved by the auto window 163 // Gets/Sets the bounds of the window before it was moved by the auto window
152 // management. As long as it was not auto-managed, it will return NULL. 164 // management. As long as it was not auto-managed, it will return NULL.
153 const gfx::Rect* pre_auto_manage_window_bounds() const { 165 const gfx::Rect* pre_auto_manage_window_bounds() const {
154 return pre_auto_manage_window_bounds_.get(); 166 return pre_auto_manage_window_bounds_.get();
155 } 167 }
156 void SetPreAutoManageWindowBounds(const gfx::Rect& bounds); 168 void SetPreAutoManageWindowBounds(const gfx::Rect& bounds);
157 169
158 // Layout related properties 170 // Layout related properties
159 171
160 void AddObserver(WindowStateObserver* observer); 172 void AddObserver(WindowStateObserver* observer);
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 bool panel_attached_; 267 bool panel_attached_;
256 bool continue_drag_after_reparent_; 268 bool continue_drag_after_reparent_;
257 bool ignored_by_shelf_; 269 bool ignored_by_shelf_;
258 bool can_consume_system_keys_; 270 bool can_consume_system_keys_;
259 bool top_row_keys_are_function_keys_; 271 bool top_row_keys_are_function_keys_;
260 WindowResizer* window_resizer_; 272 WindowResizer* window_resizer_;
261 273
262 bool always_restores_to_restore_bounds_; 274 bool always_restores_to_restore_bounds_;
263 bool hide_shelf_when_fullscreen_; 275 bool hide_shelf_when_fullscreen_;
264 bool animate_to_fullscreen_; 276 bool animate_to_fullscreen_;
277 bool minimum_visibility_;
265 278
266 // A property to remember the window position which was set before the 279 // A property to remember the window position which was set before the
267 // auto window position manager changed the window bounds, so that it can get 280 // auto window position manager changed the window bounds, so that it can get
268 // restored when only this one window gets shown. 281 // restored when only this one window gets shown.
269 scoped_ptr<gfx::Rect> pre_auto_manage_window_bounds_; 282 scoped_ptr<gfx::Rect> pre_auto_manage_window_bounds_;
270 283
271 ObserverList<WindowStateObserver> observer_list_; 284 ObserverList<WindowStateObserver> observer_list_;
272 285
273 WindowShowType window_show_type_; 286 WindowShowType window_show_type_;
274 287
275 DISALLOW_COPY_AND_ASSIGN(WindowState); 288 DISALLOW_COPY_AND_ASSIGN(WindowState);
276 }; 289 };
277 290
278 // Returns the WindowState for active window. Returns |NULL| 291 // Returns the WindowState for active window. Returns |NULL|
279 // if there is no active window. 292 // if there is no active window.
280 ASH_EXPORT WindowState* GetActiveWindowState(); 293 ASH_EXPORT WindowState* GetActiveWindowState();
281 294
282 // Returns the WindowState for |window|. Creates WindowState 295 // Returns the WindowState for |window|. Creates WindowState
283 // if it didn't exist. The settings object is owned by |window|. 296 // if it didn't exist. The settings object is owned by |window|.
284 ASH_EXPORT WindowState* GetWindowState(aura::Window* window); 297 ASH_EXPORT WindowState* GetWindowState(aura::Window* window);
285 298
286 // const version of GetWindowState. 299 // const version of GetWindowState.
287 ASH_EXPORT const WindowState* 300 ASH_EXPORT const WindowState*
288 GetWindowState(const aura::Window* window); 301 GetWindowState(const aura::Window* window);
289 302
290 } // namespace wm 303 } // namespace wm
291 } // namespace ash 304 } // namespace ash
292 305
293 #endif // ASH_WM_WINDOW_STATE_H_ 306 #endif // ASH_WM_WINDOW_STATE_H_
OLDNEW
« no previous file with comments | « ash/wm/window_positioner_unittest.cc ('k') | ash/wm/window_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698