OLD | NEW |
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/drag_details.h" | 9 #include "ash/wm/drag_details.h" |
10 #include "ash/wm/wm_types.h" | 10 #include "ash/wm/wm_types.h" |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 return pre_auto_manage_window_bounds_.get(); | 224 return pre_auto_manage_window_bounds_.get(); |
225 } | 225 } |
226 void SetPreAutoManageWindowBounds(const gfx::Rect& bounds); | 226 void SetPreAutoManageWindowBounds(const gfx::Rect& bounds); |
227 | 227 |
228 // Layout related properties | 228 // Layout related properties |
229 | 229 |
230 void AddObserver(WindowStateObserver* observer); | 230 void AddObserver(WindowStateObserver* observer); |
231 void RemoveObserver(WindowStateObserver* observer); | 231 void RemoveObserver(WindowStateObserver* observer); |
232 | 232 |
233 // Whether the window is being dragged. | 233 // Whether the window is being dragged. |
234 bool is_dragged() const { | 234 bool is_dragged() const { return !!drag_details_; } |
235 return drag_details_; | |
236 } | |
237 | 235 |
238 // Whether or not the window's position can be managed by the | 236 // Whether or not the window's position can be managed by the |
239 // auto management logic. | 237 // auto management logic. |
240 bool window_position_managed() const { return window_position_managed_; } | 238 bool window_position_managed() const { return window_position_managed_; } |
241 void set_window_position_managed(bool window_position_managed) { | 239 void set_window_position_managed(bool window_position_managed) { |
242 window_position_managed_ = window_position_managed; | 240 window_position_managed_ = window_position_managed; |
243 } | 241 } |
244 | 242 |
245 // Whether or not the window's position or size was changed by a user. | 243 // Whether or not the window's position or size was changed by a user. |
246 bool bounds_changed_by_user() const { return bounds_changed_by_user_; } | 244 bool bounds_changed_by_user() const { return bounds_changed_by_user_; } |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 ASH_EXPORT WindowState* GetWindowState(aura::Window* window); | 402 ASH_EXPORT WindowState* GetWindowState(aura::Window* window); |
405 | 403 |
406 // const version of GetWindowState. | 404 // const version of GetWindowState. |
407 ASH_EXPORT const WindowState* | 405 ASH_EXPORT const WindowState* |
408 GetWindowState(const aura::Window* window); | 406 GetWindowState(const aura::Window* window); |
409 | 407 |
410 } // namespace wm | 408 } // namespace wm |
411 } // namespace ash | 409 } // namespace ash |
412 | 410 |
413 #endif // ASH_WM_WINDOW_STATE_H_ | 411 #endif // ASH_WM_WINDOW_STATE_H_ |
OLD | NEW |