| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_COMMON_WM_EVENT_H_ | 5 #ifndef ASH_WM_COMMON_WM_EVENT_H_ |
| 6 #define ASH_WM_COMMON_WM_EVENT_H_ | 6 #define ASH_WM_COMMON_WM_EVENT_H_ |
| 7 | 7 |
| 8 #include "ash/wm/common/ash_wm_common_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/wm/common/wm_types.h" | 9 #include "ash/wm/common/wm_types.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "ui/gfx/geometry/rect.h" | 11 #include "ui/gfx/geometry/rect.h" |
| 12 | 12 |
| 13 // TODO(sky): move to common. | 13 // TODO(sky): move to common. |
| 14 namespace ash { | 14 namespace ash { |
| 15 namespace wm { | 15 namespace wm { |
| 16 | 16 |
| 17 // WMEventType defines a set of operations that can change the | 17 // WMEventType defines a set of operations that can change the |
| 18 // window's state type and bounds. | 18 // window's state type and bounds. |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 WM_EVENT_ADDED_TO_WORKSPACE, | 84 WM_EVENT_ADDED_TO_WORKSPACE, |
| 85 | 85 |
| 86 // Bounds of the display has changed. | 86 // Bounds of the display has changed. |
| 87 WM_EVENT_DISPLAY_BOUNDS_CHANGED, | 87 WM_EVENT_DISPLAY_BOUNDS_CHANGED, |
| 88 | 88 |
| 89 // Bounds of the work area has changed. This will not occur when the work | 89 // Bounds of the work area has changed. This will not occur when the work |
| 90 // area has changed as a result of DISPLAY_BOUNDS_CHANGED. | 90 // area has changed as a result of DISPLAY_BOUNDS_CHANGED. |
| 91 WM_EVENT_WORKAREA_BOUNDS_CHANGED, | 91 WM_EVENT_WORKAREA_BOUNDS_CHANGED, |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 class ASH_WM_COMMON_EXPORT WMEvent { | 94 class ASH_EXPORT WMEvent { |
| 95 public: | 95 public: |
| 96 explicit WMEvent(WMEventType type); | 96 explicit WMEvent(WMEventType type); |
| 97 virtual ~WMEvent(); | 97 virtual ~WMEvent(); |
| 98 | 98 |
| 99 WMEventType type() const { return type_; } | 99 WMEventType type() const { return type_; } |
| 100 | 100 |
| 101 private: | 101 private: |
| 102 WMEventType type_; | 102 WMEventType type_; |
| 103 DISALLOW_COPY_AND_ASSIGN(WMEvent); | 103 DISALLOW_COPY_AND_ASSIGN(WMEvent); |
| 104 }; | 104 }; |
| 105 | 105 |
| 106 // An WMEvent to request new bounds for the window. | 106 // An WMEvent to request new bounds for the window. |
| 107 class ASH_WM_COMMON_EXPORT SetBoundsEvent : public WMEvent { | 107 class ASH_EXPORT SetBoundsEvent : public WMEvent { |
| 108 public: | 108 public: |
| 109 SetBoundsEvent(WMEventType type, const gfx::Rect& requested_bounds); | 109 SetBoundsEvent(WMEventType type, const gfx::Rect& requested_bounds); |
| 110 ~SetBoundsEvent() override; | 110 ~SetBoundsEvent() override; |
| 111 | 111 |
| 112 const gfx::Rect& requested_bounds() const { return requested_bounds_; } | 112 const gfx::Rect& requested_bounds() const { return requested_bounds_; } |
| 113 | 113 |
| 114 private: | 114 private: |
| 115 gfx::Rect requested_bounds_; | 115 gfx::Rect requested_bounds_; |
| 116 | 116 |
| 117 DISALLOW_COPY_AND_ASSIGN(SetBoundsEvent); | 117 DISALLOW_COPY_AND_ASSIGN(SetBoundsEvent); |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 } // namespace wm | 120 } // namespace wm |
| 121 } // namespace ash | 121 } // namespace ash |
| 122 | 122 |
| 123 #endif // ASH_WM_COMMON_WM_EVENT_H_ | 123 #endif // ASH_WM_COMMON_WM_EVENT_H_ |
| OLD | NEW |