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" |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
15 #include "ui/aura/window_observer.h" | 15 #include "ui/aura/window_observer.h" |
16 #include "ui/base/ui_base_types.h" | 16 #include "ui/base/ui_base_types.h" |
17 | 17 |
18 namespace aura { | 18 namespace aura { |
19 class Window; | 19 class Window; |
20 } | 20 } |
21 | 21 |
22 namespace gfx { | 22 namespace gfx { |
23 class Rect; | 23 class Rect; |
24 } | 24 } |
25 | 25 |
26 namespace ash { | 26 namespace ash { |
27 class WorkspaceLayoutManager; | 27 class WorkspaceLayoutManager; |
| 28 class LockWindowState; |
28 class MaximizeModeWindowState; | 29 class MaximizeModeWindowState; |
29 | 30 |
30 namespace wm { | 31 namespace wm { |
31 class WindowStateDelegate; | 32 class WindowStateDelegate; |
32 class WindowStateObserver; | 33 class WindowStateObserver; |
33 class WMEvent; | 34 class WMEvent; |
34 | 35 |
35 // WindowState manages and defines ash specific window state and | 36 // WindowState manages and defines ash specific window state and |
36 // behavior. Ash specific per-window state (such as ones that controls | 37 // behavior. Ash specific per-window state (such as ones that controls |
37 // window manager behavior) and ash specific window behavior (such as | 38 // window manager behavior) and ash specific window behavior (such as |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 const DragDetails* drag_details() const { return drag_details_.get(); } | 297 const DragDetails* drag_details() const { return drag_details_.get(); } |
297 DragDetails* drag_details() { return drag_details_.get(); } | 298 DragDetails* drag_details() { return drag_details_.get(); } |
298 | 299 |
299 // aura::WindowObserver overrides: | 300 // aura::WindowObserver overrides: |
300 virtual void OnWindowPropertyChanged(aura::Window* window, | 301 virtual void OnWindowPropertyChanged(aura::Window* window, |
301 const void* key, | 302 const void* key, |
302 intptr_t old) OVERRIDE; | 303 intptr_t old) OVERRIDE; |
303 | 304 |
304 private: | 305 private: |
305 friend class DefaultState; | 306 friend class DefaultState; |
| 307 friend class ash::LockWindowState; |
306 friend class ash::MaximizeModeWindowState; | 308 friend class ash::MaximizeModeWindowState; |
307 FRIEND_TEST_ALL_PREFIXES(WindowAnimationsTest, CrossFadeToBounds); | 309 FRIEND_TEST_ALL_PREFIXES(WindowAnimationsTest, CrossFadeToBounds); |
308 | 310 |
309 WindowStateDelegate* delegate() { return delegate_.get(); } | 311 WindowStateDelegate* delegate() { return delegate_.get(); } |
310 | 312 |
311 // Returns the window's current show state. | 313 // Returns the window's current show state. |
312 ui::WindowShowState GetShowState() const; | 314 ui::WindowShowState GetShowState() const; |
313 | 315 |
314 // Sets the window's bounds in screen coordinates. | 316 // Sets the window's bounds in screen coordinates. |
315 void SetBoundsInScreen(const gfx::Rect& bounds_in_screen); | 317 void SetBoundsInScreen(const gfx::Rect& bounds_in_screen); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 ASH_EXPORT WindowState* GetWindowState(aura::Window* window); | 385 ASH_EXPORT WindowState* GetWindowState(aura::Window* window); |
384 | 386 |
385 // const version of GetWindowState. | 387 // const version of GetWindowState. |
386 ASH_EXPORT const WindowState* | 388 ASH_EXPORT const WindowState* |
387 GetWindowState(const aura::Window* window); | 389 GetWindowState(const aura::Window* window); |
388 | 390 |
389 } // namespace wm | 391 } // namespace wm |
390 } // namespace ash | 392 } // namespace ash |
391 | 393 |
392 #endif // ASH_WM_WINDOW_STATE_H_ | 394 #endif // ASH_WM_WINDOW_STATE_H_ |
OLD | NEW |