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 #include "services/ui/ws/server_window.h" | 5 #include "services/ui/ws/server_window.h" |
6 | 6 |
7 #include <inttypes.h> | 7 #include <inttypes.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 } | 180 } |
181 | 181 |
182 void ServerWindow::SetHitTestMask(const gfx::Rect& mask) { | 182 void ServerWindow::SetHitTestMask(const gfx::Rect& mask) { |
183 hit_test_mask_.reset(new gfx::Rect(mask)); | 183 hit_test_mask_.reset(new gfx::Rect(mask)); |
184 } | 184 } |
185 | 185 |
186 void ServerWindow::ClearHitTestMask() { | 186 void ServerWindow::ClearHitTestMask() { |
187 hit_test_mask_.reset(); | 187 hit_test_mask_.reset(); |
188 } | 188 } |
189 | 189 |
| 190 void ServerWindow::SetCanAcceptDrops(bool accepts_drops) { |
| 191 accepts_drops_ = accepts_drops; |
| 192 } |
| 193 |
190 const ServerWindow* ServerWindow::GetRoot() const { | 194 const ServerWindow* ServerWindow::GetRoot() const { |
191 return delegate_->GetRootWindow(this); | 195 return delegate_->GetRootWindow(this); |
192 } | 196 } |
193 | 197 |
194 ServerWindow* ServerWindow::GetChildWindow(const WindowId& window_id) { | 198 ServerWindow* ServerWindow::GetChildWindow(const WindowId& window_id) { |
195 if (id_ == window_id) | 199 if (id_ == window_id) |
196 return this; | 200 return this; |
197 | 201 |
198 for (ServerWindow* child : children_) { | 202 for (ServerWindow* child : children_) { |
199 ServerWindow* window = child->GetChildWindow(window_id); | 203 ServerWindow* window = child->GetChildWindow(window_id); |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 } | 457 } |
454 | 458 |
455 // static | 459 // static |
456 ServerWindow** ServerWindow::GetStackingTarget(ServerWindow* window) { | 460 ServerWindow** ServerWindow::GetStackingTarget(ServerWindow* window) { |
457 return &window->stacking_target_; | 461 return &window->stacking_target_; |
458 } | 462 } |
459 | 463 |
460 } // namespace ws | 464 } // namespace ws |
461 | 465 |
462 } // namespace ui | 466 } // namespace ui |
OLD | NEW |