Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_COMMON_WM_WINDOW_H_ | 5 #ifndef ASH_COMMON_WM_WINDOW_H_ |
| 6 #define ASH_COMMON_WM_WINDOW_H_ | 6 #define ASH_COMMON_WM_WINDOW_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace gfx { | 23 namespace gfx { |
| 24 class Point; | 24 class Point; |
| 25 class Rect; | 25 class Rect; |
| 26 class Size; | 26 class Size; |
| 27 class Transform; | 27 class Transform; |
| 28 } | 28 } |
| 29 | 29 |
| 30 namespace ui { | 30 namespace ui { |
| 31 class EventHandler; | |
| 31 class Layer; | 32 class Layer; |
| 32 } | 33 } |
| 33 | 34 |
| 34 namespace views { | 35 namespace views { |
| 35 class View; | 36 class View; |
| 36 class Widget; | 37 class Widget; |
| 37 } | 38 } |
| 38 | 39 |
| 39 namespace ash { | 40 namespace ash { |
| 40 | 41 |
| 41 class WmLayoutManager; | 42 class WmLayoutManager; |
| 42 class WmRootWindowController; | 43 class WmRootWindowController; |
| 43 class WmShell; | 44 class WmShell; |
| 44 class WmWindowObserver; | 45 class WmWindowObserver; |
| 45 enum class WmWindowProperty; | 46 enum class WmWindowProperty; |
| 46 | 47 |
| 47 namespace wm { | 48 namespace wm { |
| 48 class WMEvent; | |
| 49 class WindowState; | 49 class WindowState; |
| 50 } | 50 } |
| 51 | 51 |
| 52 // This class exists as a porting layer to allow ash/wm to work with | 52 // This class exists as a porting layer to allow ash/wm to work with |
| 53 // aura::Window or ui::Window. See aura::Window for details on the functions. | 53 // aura::Window or ui::Window. See aura::Window for details on the functions. |
| 54 class ASH_EXPORT WmWindow { | 54 class ASH_EXPORT WmWindow { |
| 55 public: | 55 public: |
| 56 // See comments in SetBoundsInScreen(). | 56 // See comments in SetBoundsInScreen(). |
| 57 enum class BoundsInScreenBehavior { | 57 enum class BoundsInScreenBehavior { |
| 58 USE_LOCAL_COORDINATES, | 58 USE_LOCAL_COORDINATES, |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 277 // container. This is used by SetBoundsInScreen(). | 277 // container. This is used by SetBoundsInScreen(). |
| 278 virtual void SetDescendantsStayInSameRootWindow(bool value) = 0; | 278 virtual void SetDescendantsStayInSameRootWindow(bool value) = 0; |
| 279 | 279 |
| 280 // Returns a View that renders the contents of this window's layers. | 280 // Returns a View that renders the contents of this window's layers. |
| 281 virtual std::unique_ptr<views::View> CreateViewWithRecreatedLayers() = 0; | 281 virtual std::unique_ptr<views::View> CreateViewWithRecreatedLayers() = 0; |
| 282 | 282 |
| 283 virtual void AddObserver(WmWindowObserver* observer) = 0; | 283 virtual void AddObserver(WmWindowObserver* observer) = 0; |
| 284 virtual void RemoveObserver(WmWindowObserver* observer) = 0; | 284 virtual void RemoveObserver(WmWindowObserver* observer) = 0; |
| 285 virtual bool HasObserver(const WmWindowObserver* observer) const = 0; | 285 virtual bool HasObserver(const WmWindowObserver* observer) const = 0; |
| 286 | 286 |
| 287 // Adds or removes a handler to receive events targeted at this window, before | |
| 288 // this window handles the events itself; the handler does not recieve events | |
| 289 // from embedded windows. This only supports windows with associated widgets. | |
|
sky
2016/07/26 21:07:20
associated -> internal
And a comment to see GetInt
msw
2016/07/26 21:17:19
Done.
| |
| 290 // Ownership of the handler is not transferred. | |
| 291 virtual void AddLimitedPreTargetHandler(ui::EventHandler* handler) = 0; | |
| 292 virtual void RemoveLimitedPreTargetHandler(ui::EventHandler* handler) = 0; | |
| 293 | |
| 287 protected: | 294 protected: |
| 288 virtual ~WmWindow() {} | 295 virtual ~WmWindow() {} |
| 289 }; | 296 }; |
| 290 | 297 |
| 291 } // namespace ash | 298 } // namespace ash |
| 292 | 299 |
| 293 #endif // ASH_COMMON_WM_WINDOW_H_ | 300 #endif // ASH_COMMON_WM_WINDOW_H_ |
| OLD | NEW |