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 SERVICES_UI_WS_SERVER_WINDOW_H_ | 5 #ifndef SERVICES_UI_WS_SERVER_WINDOW_H_ |
6 #define SERVICES_UI_WS_SERVER_WINDOW_H_ | 6 #define SERVICES_UI_WS_SERVER_WINDOW_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
79 return additional_client_areas_; | 79 return additional_client_areas_; |
80 } | 80 } |
81 const gfx::Insets& client_area() const { return client_area_; } | 81 const gfx::Insets& client_area() const { return client_area_; } |
82 void SetClientArea(const gfx::Insets& insets, | 82 void SetClientArea(const gfx::Insets& insets, |
83 const std::vector<gfx::Rect>& additional_client_areas); | 83 const std::vector<gfx::Rect>& additional_client_areas); |
84 | 84 |
85 const gfx::Rect* hit_test_mask() const { return hit_test_mask_.get(); } | 85 const gfx::Rect* hit_test_mask() const { return hit_test_mask_.get(); } |
86 void SetHitTestMask(const gfx::Rect& mask); | 86 void SetHitTestMask(const gfx::Rect& mask); |
87 void ClearHitTestMask(); | 87 void ClearHitTestMask(); |
88 | 88 |
89 bool can_accept_drags() const { return accepts_drags_; } | |
90 void SetCanAcceptDrags(bool accepts_drags); | |
91 | |
89 int32_t cursor() const { return static_cast<int32_t>(cursor_id_); } | 92 int32_t cursor() const { return static_cast<int32_t>(cursor_id_); } |
90 int32_t non_client_cursor() const { | 93 int32_t non_client_cursor() const { |
91 return static_cast<int32_t>(non_client_cursor_id_); | 94 return static_cast<int32_t>(non_client_cursor_id_); |
92 } | 95 } |
93 | 96 |
94 const ServerWindow* parent() const { return parent_; } | 97 const ServerWindow* parent() const { return parent_; } |
95 ServerWindow* parent() { return parent_; } | 98 ServerWindow* parent() { return parent_; } |
96 | 99 |
97 const ServerWindow* GetRoot() const; | 100 const ServerWindow* GetRoot() const; |
98 ServerWindow* GetRoot() { | 101 ServerWindow* GetRoot() { |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
234 gfx::Vector2d underlay_offset_; | 237 gfx::Vector2d underlay_offset_; |
235 | 238 |
236 // The hit test for windows extends outside the bounds of the window by this | 239 // The hit test for windows extends outside the bounds of the window by this |
237 // amount. | 240 // amount. |
238 gfx::Insets extended_hit_test_region_; | 241 gfx::Insets extended_hit_test_region_; |
239 | 242 |
240 // Mouse events outside the hit test mask don't hit the window. An empty mask | 243 // Mouse events outside the hit test mask don't hit the window. An empty mask |
241 // means all events miss the window. If null there is no mask. | 244 // means all events miss the window. If null there is no mask. |
242 std::unique_ptr<gfx::Rect> hit_test_mask_; | 245 std::unique_ptr<gfx::Rect> hit_test_mask_; |
243 | 246 |
247 // Whether this window can be the target in a drag and drop | |
248 // operation. Clients must opt-in to this. | |
249 bool accepts_drags_ = false; | |
sky
2016/09/06 21:11:27
Isn't this accepts_drops_?
| |
250 | |
244 base::ObserverList<ServerWindowObserver> observers_; | 251 base::ObserverList<ServerWindowObserver> observers_; |
245 | 252 |
246 DISALLOW_COPY_AND_ASSIGN(ServerWindow); | 253 DISALLOW_COPY_AND_ASSIGN(ServerWindow); |
247 }; | 254 }; |
248 | 255 |
249 } // namespace ws | 256 } // namespace ws |
250 } // namespace ui | 257 } // namespace ui |
251 | 258 |
252 #endif // SERVICES_UI_WS_SERVER_WINDOW_H_ | 259 #endif // SERVICES_UI_WS_SERVER_WINDOW_H_ |
OLD | NEW |