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/window_server.h" | 5 #include "components/mus/ws/window_server.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/display.h" | 9 #include "components/mus/ws/display.h" |
| 10 #include "components/mus/ws/display_binding.h" | 10 #include "components/mus/ws/display_binding.h" |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 392 pair.second->ProcessCursorChanged(window, cursor_id, | 392 pair.second->ProcessCursorChanged(window, cursor_id, |
| 393 IsOperationSource(pair.first)); | 393 IsOperationSource(pair.first)); |
| 394 } | 394 } |
| 395 | 395 |
| 396 // Pass the cursor change to the native window. | 396 // Pass the cursor change to the native window. |
| 397 Display* display = display_manager_->GetDisplayContaining(window); | 397 Display* display = display_manager_->GetDisplayContaining(window); |
| 398 if (display) | 398 if (display) |
| 399 display->OnCursorUpdated(window); | 399 display->OnCursorUpdated(window); |
| 400 } | 400 } |
| 401 | 401 |
| 402 void WindowServer::SendToEventObservers(const ui::Event& event) { | |
| 403 for (auto& pair : tree_map_) { | |
|
sky
2016/04/21 17:23:04
nit: no {}
James Cook
2016/04/22 18:22:54
Done.
| |
| 404 pair.second->SendToEventObserver(event); | |
| 405 } | |
|
sadrul
2016/04/21 19:15:29
It should send only if the requestor and the targe
James Cook
2016/04/22 18:22:54
Done.
| |
| 406 } | |
| 407 | |
| 402 void WindowServer::ProcessViewportMetricsChanged( | 408 void WindowServer::ProcessViewportMetricsChanged( |
| 403 Display* display, | 409 Display* display, |
| 404 const mojom::ViewportMetrics& old_metrics, | 410 const mojom::ViewportMetrics& old_metrics, |
| 405 const mojom::ViewportMetrics& new_metrics) { | 411 const mojom::ViewportMetrics& new_metrics) { |
| 406 for (auto& pair : tree_map_) { | 412 for (auto& pair : tree_map_) { |
| 407 pair.second->ProcessViewportMetricsChanged( | 413 pair.second->ProcessViewportMetricsChanged( |
| 408 display, old_metrics, new_metrics, IsOperationSource(pair.first)); | 414 display, old_metrics, new_metrics, IsOperationSource(pair.first)); |
| 409 } | 415 } |
| 410 } | 416 } |
| 411 | 417 |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 646 void WindowServer::OnFirstDisplayReady() { | 652 void WindowServer::OnFirstDisplayReady() { |
| 647 delegate_->OnFirstDisplayReady(); | 653 delegate_->OnFirstDisplayReady(); |
| 648 } | 654 } |
| 649 | 655 |
| 650 void WindowServer::OnNoMoreDisplays() { | 656 void WindowServer::OnNoMoreDisplays() { |
| 651 delegate_->OnNoMoreDisplays(); | 657 delegate_->OnNoMoreDisplays(); |
| 652 } | 658 } |
| 653 | 659 |
| 654 } // namespace ws | 660 } // namespace ws |
| 655 } // namespace mus | 661 } // namespace mus |
| OLD | NEW |