| 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/wm_types.h" | 9 #include "ash/wm/wm_types.h" |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 // Predicates to check window state. | 62 // Predicates to check window state. |
| 63 bool IsMinimized() const; | 63 bool IsMinimized() const; |
| 64 bool IsMaximized() const; | 64 bool IsMaximized() const; |
| 65 bool IsFullscreen() const; | 65 bool IsFullscreen() const; |
| 66 bool IsMaximizedOrFullscreen() const; | 66 bool IsMaximizedOrFullscreen() const; |
| 67 // True if the window's show state is SHOW_STATE_NORMAL or | 67 // True if the window's show state is SHOW_STATE_NORMAL or |
| 68 // SHOW_STATE_DEFAULT. | 68 // SHOW_STATE_DEFAULT. |
| 69 bool IsNormalShowState() const; | 69 bool IsNormalShowState() const; |
| 70 bool IsActive() const; | 70 bool IsActive() const; |
| 71 bool IsDocked() const; | 71 bool IsDocked() const; |
| 72 bool IsSnapped() const; |
| 72 | 73 |
| 73 // Checks if the window can change its state accordingly. | 74 // Checks if the window can change its state accordingly. |
| 74 bool CanMaximize() const; | 75 bool CanMaximize() const; |
| 75 bool CanMinimize() const; | 76 bool CanMinimize() const; |
| 76 bool CanResize() const; | 77 bool CanResize() const; |
| 77 bool CanSnap() const; | 78 bool CanSnap() const; |
| 78 bool CanActivate() const; | 79 bool CanActivate() const; |
| 79 | 80 |
| 80 // Returns true if the window has restore bounds. | 81 // Returns true if the window has restore bounds. |
| 81 bool HasRestoreBounds() const; | 82 bool HasRestoreBounds() const; |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 virtual void OnWindowPropertyChanged(aura::Window* window, | 251 virtual void OnWindowPropertyChanged(aura::Window* window, |
| 251 const void* key, | 252 const void* key, |
| 252 intptr_t old) OVERRIDE; | 253 intptr_t old) OVERRIDE; |
| 253 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; | 254 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; |
| 254 | 255 |
| 255 private: | 256 private: |
| 256 // Snaps the window to left or right of the desktop with given bounds. | 257 // Snaps the window to left or right of the desktop with given bounds. |
| 257 void SnapWindow(WindowShowType left_or_right, | 258 void SnapWindow(WindowShowType left_or_right, |
| 258 const gfx::Rect& bounds); | 259 const gfx::Rect& bounds); |
| 259 | 260 |
| 261 // Allows window to be repositioned away from the screen edge. |
| 262 void SetWindowShowTypeUnsnapped(); |
| 263 |
| 260 // The owner of this window settings. | 264 // The owner of this window settings. |
| 261 aura::Window* window_; | 265 aura::Window* window_; |
| 262 scoped_ptr<WindowStateDelegate> delegate_; | 266 scoped_ptr<WindowStateDelegate> delegate_; |
| 263 | 267 |
| 264 bool tracked_by_workspace_; | 268 bool tracked_by_workspace_; |
| 265 bool window_position_managed_; | 269 bool window_position_managed_; |
| 266 bool bounds_changed_by_user_; | 270 bool bounds_changed_by_user_; |
| 267 bool panel_attached_; | 271 bool panel_attached_; |
| 268 bool continue_drag_after_reparent_; | 272 bool continue_drag_after_reparent_; |
| 269 bool ignored_by_shelf_; | 273 bool ignored_by_shelf_; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 297 ASH_EXPORT WindowState* GetWindowState(aura::Window* window); | 301 ASH_EXPORT WindowState* GetWindowState(aura::Window* window); |
| 298 | 302 |
| 299 // const version of GetWindowState. | 303 // const version of GetWindowState. |
| 300 ASH_EXPORT const WindowState* | 304 ASH_EXPORT const WindowState* |
| 301 GetWindowState(const aura::Window* window); | 305 GetWindowState(const aura::Window* window); |
| 302 | 306 |
| 303 } // namespace wm | 307 } // namespace wm |
| 304 } // namespace ash | 308 } // namespace ash |
| 305 | 309 |
| 306 #endif // ASH_WM_WINDOW_STATE_H_ | 310 #endif // ASH_WM_WINDOW_STATE_H_ |
| OLD | NEW |