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 namespace internal { | |
28 class WorkspaceLayoutManager; | 27 class WorkspaceLayoutManager; |
29 class MaximizeModeWindowState; | 28 class MaximizeModeWindowState; |
30 } | |
31 | 29 |
32 namespace wm { | 30 namespace wm { |
33 class WindowStateDelegate; | 31 class WindowStateDelegate; |
34 class WindowStateObserver; | 32 class WindowStateObserver; |
35 class WMEvent; | 33 class WMEvent; |
36 | 34 |
37 // WindowState manages and defines ash specific window state and | 35 // WindowState manages and defines ash specific window state and |
38 // behavior. Ash specific per-window state (such as ones that controls | 36 // behavior. Ash specific per-window state (such as ones that controls |
39 // window manager behavior) and ash specific window behavior (such as | 37 // window manager behavior) and ash specific window behavior (such as |
40 // maximize, minimize, snap sizing etc) should be added here instead | 38 // maximize, minimize, snap sizing etc) should be added here instead |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 const DragDetails* drag_details() const { return drag_details_.get(); } | 287 const DragDetails* drag_details() const { return drag_details_.get(); } |
290 DragDetails* drag_details() { return drag_details_.get(); } | 288 DragDetails* drag_details() { return drag_details_.get(); } |
291 | 289 |
292 // aura::WindowObserver overrides: | 290 // aura::WindowObserver overrides: |
293 virtual void OnWindowPropertyChanged(aura::Window* window, | 291 virtual void OnWindowPropertyChanged(aura::Window* window, |
294 const void* key, | 292 const void* key, |
295 intptr_t old) OVERRIDE; | 293 intptr_t old) OVERRIDE; |
296 | 294 |
297 private: | 295 private: |
298 friend class DefaultState; | 296 friend class DefaultState; |
299 friend class ash::internal::MaximizeModeWindowState; | 297 friend class ash::MaximizeModeWindowState; |
300 FRIEND_TEST_ALL_PREFIXES(WindowAnimationsTest, CrossFadeToBounds); | 298 FRIEND_TEST_ALL_PREFIXES(WindowAnimationsTest, CrossFadeToBounds); |
301 | 299 |
302 WindowStateDelegate* delegate() { return delegate_.get(); } | 300 WindowStateDelegate* delegate() { return delegate_.get(); } |
303 | 301 |
304 // Returns the window's current show state. | 302 // Returns the window's current show state. |
305 ui::WindowShowState GetShowState() const; | 303 ui::WindowShowState GetShowState() const; |
306 | 304 |
307 // Sets the window's bounds in screen coordinates. | 305 // Sets the window's bounds in screen coordinates. |
308 void SetBoundsInScreen(const gfx::Rect& bounds_in_screen); | 306 void SetBoundsInScreen(const gfx::Rect& bounds_in_screen); |
309 | 307 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 ASH_EXPORT WindowState* GetWindowState(aura::Window* window); | 373 ASH_EXPORT WindowState* GetWindowState(aura::Window* window); |
376 | 374 |
377 // const version of GetWindowState. | 375 // const version of GetWindowState. |
378 ASH_EXPORT const WindowState* | 376 ASH_EXPORT const WindowState* |
379 GetWindowState(const aura::Window* window); | 377 GetWindowState(const aura::Window* window); |
380 | 378 |
381 } // namespace wm | 379 } // namespace wm |
382 } // namespace ash | 380 } // namespace ash |
383 | 381 |
384 #endif // ASH_WM_WINDOW_STATE_H_ | 382 #endif // ASH_WM_WINDOW_STATE_H_ |
OLD | NEW |