| 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 "components/mus/ws/server_window.h" | 5 #include "components/mus/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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 return; | 172 return; |
| 173 } | 173 } |
| 174 | 174 |
| 175 additional_client_areas_ = additional_client_areas; | 175 additional_client_areas_ = additional_client_areas; |
| 176 client_area_ = insets; | 176 client_area_ = insets; |
| 177 FOR_EACH_OBSERVER( | 177 FOR_EACH_OBSERVER( |
| 178 ServerWindowObserver, observers_, | 178 ServerWindowObserver, observers_, |
| 179 OnWindowClientAreaChanged(this, insets, additional_client_areas)); | 179 OnWindowClientAreaChanged(this, insets, additional_client_areas)); |
| 180 } | 180 } |
| 181 | 181 |
| 182 void ServerWindow::SetHitTestMask(const gfx::Rect& mask) { |
| 183 hit_test_mask_.reset(new gfx::Rect(mask)); |
| 184 } |
| 185 |
| 186 void ServerWindow::ClearHitTestMask() { |
| 187 hit_test_mask_.reset(); |
| 188 } |
| 189 |
| 182 const ServerWindow* ServerWindow::GetRoot() const { | 190 const ServerWindow* ServerWindow::GetRoot() const { |
| 183 return delegate_->GetRootWindow(this); | 191 return delegate_->GetRootWindow(this); |
| 184 } | 192 } |
| 185 | 193 |
| 186 std::vector<const ServerWindow*> ServerWindow::GetChildren() const { | 194 std::vector<const ServerWindow*> ServerWindow::GetChildren() const { |
| 187 std::vector<const ServerWindow*> children; | 195 std::vector<const ServerWindow*> children; |
| 188 children.reserve(children_.size()); | 196 children.reserve(children_.size()); |
| 189 for (size_t i = 0; i < children_.size(); ++i) | 197 for (size_t i = 0; i < children_.size(); ++i) |
| 190 children.push_back(children_[i]); | 198 children.push_back(children_[i]); |
| 191 return children; | 199 return children; |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 } | 462 } |
| 455 | 463 |
| 456 // static | 464 // static |
| 457 ServerWindow** ServerWindow::GetStackingTarget(ServerWindow* window) { | 465 ServerWindow** ServerWindow::GetStackingTarget(ServerWindow* window) { |
| 458 return &window->stacking_target_; | 466 return &window->stacking_target_; |
| 459 } | 467 } |
| 460 | 468 |
| 461 } // namespace ws | 469 } // namespace ws |
| 462 | 470 |
| 463 } // namespace mus | 471 } // namespace mus |
| OLD | NEW |