Chromium Code Reviews| 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/connection_manager.h" | 5 #include "components/mus/ws/connection_manager.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "components/mus/ws/client_connection.h" | 9 #include "components/mus/ws/client_connection.h" |
| 10 #include "components/mus/ws/connection_manager_delegate.h" | 10 #include "components/mus/ws/connection_manager_delegate.h" |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 461 (!window->visible() && window->parent()->IsDrawn()))) { | 461 (!window->visible() && window->parent()->IsDrawn()))) { |
| 462 SchedulePaint(window->parent(), window->bounds()); | 462 SchedulePaint(window->parent(), window->bounds()); |
| 463 } | 463 } |
| 464 | 464 |
| 465 for (auto& pair : connection_map_) { | 465 for (auto& pair : connection_map_) { |
| 466 pair.second->service()->ProcessWillChangeWindowVisibility( | 466 pair.second->service()->ProcessWillChangeWindowVisibility( |
| 467 window, IsOperationSource(pair.first)); | 467 window, IsOperationSource(pair.first)); |
| 468 } | 468 } |
| 469 } | 469 } |
| 470 | 470 |
| 471 void ConnectionManager::OnWindowCursorChanged(ServerWindow* window, | |
| 472 int32_t cursor_id) { | |
| 473 if (in_destructor_) | |
| 474 return; | |
| 475 | |
| 476 for (auto& pair : connection_map_) { | |
| 477 pair.second->service()->ProcessCursorChanged( | |
| 478 window, cursor_id, IsOperationSource(pair.first)); | |
| 479 } | |
| 480 | |
| 481 // Pass the cursor change to our native window. | |
|
sky
2015/12/01 21:48:00
out->the (as there may be more than one native win
Elliot Glaysher
2015/12/02 20:01:32
Done.
| |
| 482 WindowTreeHostImpl* host = GetWindowTreeHostByWindow(window); | |
| 483 if (host) | |
| 484 host->OnCursorUpdated(window); | |
| 485 } | |
| 486 | |
| 471 void ConnectionManager::OnWindowSharedPropertyChanged( | 487 void ConnectionManager::OnWindowSharedPropertyChanged( |
| 472 ServerWindow* window, | 488 ServerWindow* window, |
| 473 const std::string& name, | 489 const std::string& name, |
| 474 const std::vector<uint8_t>* new_data) { | 490 const std::vector<uint8_t>* new_data) { |
| 475 for (auto& pair : connection_map_) { | 491 for (auto& pair : connection_map_) { |
| 476 pair.second->service()->ProcessWindowPropertyChanged( | 492 pair.second->service()->ProcessWindowPropertyChanged( |
| 477 window, name, new_data, IsOperationSource(pair.first)); | 493 window, name, new_data, IsOperationSource(pair.first)); |
| 478 } | 494 } |
| 479 } | 495 } |
| 480 | 496 |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 501 return; | 517 return; |
| 502 for (auto& pair : connection_map_) { | 518 for (auto& pair : connection_map_) { |
| 503 pair.second->service()->ProcessTransientWindowRemoved( | 519 pair.second->service()->ProcessTransientWindowRemoved( |
| 504 window, transient_child, IsOperationSource(pair.first)); | 520 window, transient_child, IsOperationSource(pair.first)); |
| 505 } | 521 } |
| 506 } | 522 } |
| 507 | 523 |
| 508 } // namespace ws | 524 } // namespace ws |
| 509 | 525 |
| 510 } // namespace mus | 526 } // namespace mus |
| OLD | NEW |