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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 // Gets called before the state objects gets deactivated / detached from the | 72 // Gets called before the state objects gets deactivated / detached from the |
73 // window, so that it can save the various states it is interested in. | 73 // window, so that it can save the various states it is interested in. |
74 // Note: This only gets called when the state object gets changed. | 74 // Note: This only gets called when the state object gets changed. |
75 virtual void DetachState(WindowState* window_state) = 0; | 75 virtual void DetachState(WindowState* window_state) = 0; |
76 | 76 |
77 private: | 77 private: |
78 DISALLOW_COPY_AND_ASSIGN(State); | 78 DISALLOW_COPY_AND_ASSIGN(State); |
79 }; | 79 }; |
80 | 80 |
81 // Call GetWindowState() to instantiate this class. | 81 // Call GetWindowState() to instantiate this class. |
82 virtual ~WindowState(); | 82 ~WindowState() override; |
83 | 83 |
84 aura::Window* window() { return window_; } | 84 aura::Window* window() { return window_; } |
85 const aura::Window* window() const { return window_; } | 85 const aura::Window* window() const { return window_; } |
86 | 86 |
87 bool HasDelegate() const; | 87 bool HasDelegate() const; |
88 void SetDelegate(scoped_ptr<WindowStateDelegate> delegate); | 88 void SetDelegate(scoped_ptr<WindowStateDelegate> delegate); |
89 | 89 |
90 // Returns the window's current ash state type. | 90 // Returns the window's current ash state type. |
91 // Refer to WindowStateType definition in wm_types.h as for why Ash | 91 // Refer to WindowStateType definition in wm_types.h as for why Ash |
92 // has its own state type. | 92 // has its own state type. |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 void DeleteDragDetails(); | 291 void DeleteDragDetails(); |
292 | 292 |
293 // Sets the currently stored restore bounds and clears the restore bounds. | 293 // Sets the currently stored restore bounds and clears the restore bounds. |
294 void SetAndClearRestoreBounds(); | 294 void SetAndClearRestoreBounds(); |
295 | 295 |
296 // Returns a pointer to DragDetails during drag operations. | 296 // Returns a pointer to DragDetails during drag operations. |
297 const DragDetails* drag_details() const { return drag_details_.get(); } | 297 const DragDetails* drag_details() const { return drag_details_.get(); } |
298 DragDetails* drag_details() { return drag_details_.get(); } | 298 DragDetails* drag_details() { return drag_details_.get(); } |
299 | 299 |
300 // aura::WindowObserver overrides: | 300 // aura::WindowObserver overrides: |
301 virtual void OnWindowPropertyChanged(aura::Window* window, | 301 void OnWindowPropertyChanged(aura::Window* window, |
302 const void* key, | 302 const void* key, |
303 intptr_t old) override; | 303 intptr_t old) override; |
304 | 304 |
305 private: | 305 private: |
306 friend class DefaultState; | 306 friend class DefaultState; |
307 friend class ash::LockWindowState; | 307 friend class ash::LockWindowState; |
308 friend class ash::MaximizeModeWindowState; | 308 friend class ash::MaximizeModeWindowState; |
309 friend ASH_EXPORT WindowState* GetWindowState(aura::Window*); | 309 friend ASH_EXPORT WindowState* GetWindowState(aura::Window*); |
310 FRIEND_TEST_ALL_PREFIXES(WindowAnimationsTest, CrossFadeToBounds); | 310 FRIEND_TEST_ALL_PREFIXES(WindowAnimationsTest, CrossFadeToBounds); |
311 FRIEND_TEST_ALL_PREFIXES(WindowAnimationsTest, | 311 FRIEND_TEST_ALL_PREFIXES(WindowAnimationsTest, |
312 CrossFadeToBoundsFromTransform); | 312 CrossFadeToBoundsFromTransform); |
313 | 313 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 ASH_EXPORT WindowState* GetWindowState(aura::Window* window); | 390 ASH_EXPORT WindowState* GetWindowState(aura::Window* window); |
391 | 391 |
392 // const version of GetWindowState. | 392 // const version of GetWindowState. |
393 ASH_EXPORT const WindowState* | 393 ASH_EXPORT const WindowState* |
394 GetWindowState(const aura::Window* window); | 394 GetWindowState(const aura::Window* window); |
395 | 395 |
396 } // namespace wm | 396 } // namespace wm |
397 } // namespace ash | 397 } // namespace ash |
398 | 398 |
399 #endif // ASH_WM_WINDOW_STATE_H_ | 399 #endif // ASH_WM_WINDOW_STATE_H_ |
OLD | NEW |