| 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/public/cpp/window_tree_client.h" | 5 #include "services/ui/public/cpp/window_tree_client.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 tree_->SetClientArea(window_id, client_area, additional_client_areas); | 274 tree_->SetClientArea(window_id, client_area, additional_client_areas); |
| 275 } | 275 } |
| 276 | 276 |
| 277 void WindowTreeClient::SetHitTestMask(Id window_id, const gfx::Rect& mask) { | 277 void WindowTreeClient::SetHitTestMask(Id window_id, const gfx::Rect& mask) { |
| 278 DCHECK(tree_); | 278 DCHECK(tree_); |
| 279 tree_->SetHitTestMask(window_id, mask); | 279 tree_->SetHitTestMask(window_id, mask); |
| 280 } | 280 } |
| 281 | 281 |
| 282 void WindowTreeClient::ClearHitTestMask(Id window_id) { | 282 void WindowTreeClient::ClearHitTestMask(Id window_id) { |
| 283 DCHECK(tree_); | 283 DCHECK(tree_); |
| 284 tree_->SetHitTestMask(window_id, {}); | 284 tree_->SetHitTestMask(window_id, base::nullopt); |
| 285 } | 285 } |
| 286 | 286 |
| 287 void WindowTreeClient::SetFocus(Window* window) { | 287 void WindowTreeClient::SetFocus(Window* window) { |
| 288 // In order for us to get here we had to have exposed a window, which implies | 288 // In order for us to get here we had to have exposed a window, which implies |
| 289 // we got a client. | 289 // we got a client. |
| 290 DCHECK(tree_); | 290 DCHECK(tree_); |
| 291 const uint32_t change_id = ScheduleInFlightChange( | 291 const uint32_t change_id = ScheduleInFlightChange( |
| 292 base::WrapUnique(new InFlightFocusChange(this, focused_window_))); | 292 base::WrapUnique(new InFlightFocusChange(this, focused_window_))); |
| 293 tree_->SetFocus(change_id, window ? server_id(window) : 0); | 293 tree_->SetFocus(change_id, window ? server_id(window) : 0); |
| 294 LocalSetFocus(window); | 294 LocalSetFocus(window); |
| (...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1250 Window* window, | 1250 Window* window, |
| 1251 const gfx::Vector2d& offset, | 1251 const gfx::Vector2d& offset, |
| 1252 const gfx::Insets& hit_area) { | 1252 const gfx::Insets& hit_area) { |
| 1253 if (window_manager_internal_client_) { | 1253 if (window_manager_internal_client_) { |
| 1254 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea( | 1254 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea( |
| 1255 server_id(window), offset.x(), offset.y(), hit_area); | 1255 server_id(window), offset.x(), offset.y(), hit_area); |
| 1256 } | 1256 } |
| 1257 } | 1257 } |
| 1258 | 1258 |
| 1259 } // namespace ui | 1259 } // namespace ui |
| OLD | NEW |