| 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/public/cpp/window.h" | 5 #include "components/mus/public/cpp/window.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 const std::vector<gfx::Rect>& additional_client_areas) { | 210 const std::vector<gfx::Rect>& additional_client_areas) { |
| 211 if (!OwnsWindowOrIsRoot(this)) | 211 if (!OwnsWindowOrIsRoot(this)) |
| 212 return; | 212 return; |
| 213 | 213 |
| 214 if (connection_) | 214 if (connection_) |
| 215 tree_client()->SetClientArea(server_id_, client_area, | 215 tree_client()->SetClientArea(server_id_, client_area, |
| 216 additional_client_areas); | 216 additional_client_areas); |
| 217 LocalSetClientArea(client_area, additional_client_areas); | 217 LocalSetClientArea(client_area, additional_client_areas); |
| 218 } | 218 } |
| 219 | 219 |
| 220 void Window::SetHitTestMask(const gfx::Rect& mask) { |
| 221 if (!OwnsWindowOrIsRoot(this)) |
| 222 return; |
| 223 |
| 224 if (connection_) |
| 225 tree_client()->SetHitTestMask(server_id_, mask); |
| 226 hit_test_mask_ = mask; |
| 227 } |
| 228 |
| 220 void Window::SetVisible(bool value) { | 229 void Window::SetVisible(bool value) { |
| 221 if (visible_ == value) | 230 if (visible_ == value) |
| 222 return; | 231 return; |
| 223 | 232 |
| 224 if (connection_) | 233 if (connection_) |
| 225 tree_client()->SetVisible(this, value); | 234 tree_client()->SetVisible(this, value); |
| 226 LocalSetVisible(value); | 235 LocalSetVisible(value); |
| 227 } | 236 } |
| 228 | 237 |
| 229 void Window::SetOpacity(float opacity) { | 238 void Window::SetOpacity(float opacity) { |
| (...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 872 notifier->NotifyWindowReordered(); | 881 notifier->NotifyWindowReordered(); |
| 873 | 882 |
| 874 return true; | 883 return true; |
| 875 } | 884 } |
| 876 | 885 |
| 877 // static | 886 // static |
| 878 Window** Window::GetStackingTarget(Window* window) { | 887 Window** Window::GetStackingTarget(Window* window) { |
| 879 return &window->stacking_target_; | 888 return &window->stacking_target_; |
| 880 } | 889 } |
| 881 } // namespace mus | 890 } // namespace mus |
| OLD | NEW |