| 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 (hit_test_mask_ && *hit_test_mask_ == mask) |
| 225 return; |
| 226 |
| 227 if (connection_) |
| 228 tree_client()->SetHitTestMask(server_id_, mask); |
| 229 hit_test_mask_.reset(new gfx::Rect(mask)); |
| 230 } |
| 231 |
| 232 void Window::ClearHitTestMask() { |
| 233 if (!OwnsWindowOrIsRoot(this)) |
| 234 return; |
| 235 |
| 236 if (!hit_test_mask_) |
| 237 return; |
| 238 |
| 239 if (connection_) |
| 240 tree_client()->ClearHitTestMask(server_id_); |
| 241 hit_test_mask_.reset(); |
| 242 } |
| 243 |
| 220 void Window::SetVisible(bool value) { | 244 void Window::SetVisible(bool value) { |
| 221 if (visible_ == value) | 245 if (visible_ == value) |
| 222 return; | 246 return; |
| 223 | 247 |
| 224 if (connection_) | 248 if (connection_) |
| 225 tree_client()->SetVisible(this, value); | 249 tree_client()->SetVisible(this, value); |
| 226 LocalSetVisible(value); | 250 LocalSetVisible(value); |
| 227 } | 251 } |
| 228 | 252 |
| 229 void Window::SetOpacity(float opacity) { | 253 void Window::SetOpacity(float opacity) { |
| (...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 872 notifier->NotifyWindowReordered(); | 896 notifier->NotifyWindowReordered(); |
| 873 | 897 |
| 874 return true; | 898 return true; |
| 875 } | 899 } |
| 876 | 900 |
| 877 // static | 901 // static |
| 878 Window** Window::GetStackingTarget(Window* window) { | 902 Window** Window::GetStackingTarget(Window* window) { |
| 879 return &window->stacking_target_; | 903 return &window->stacking_target_; |
| 880 } | 904 } |
| 881 } // namespace mus | 905 } // namespace mus |
| OLD | NEW |