| 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/ws/window_server.h" | 5 #include "services/ui/ws/window_server.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 } | 419 } |
| 420 | 420 |
| 421 void WindowServer::ProcessWillChangeWindowPredefinedCursor(ServerWindow* window, | 421 void WindowServer::ProcessWillChangeWindowPredefinedCursor(ServerWindow* window, |
| 422 int32_t cursor_id) { | 422 int32_t cursor_id) { |
| 423 for (auto& pair : tree_map_) { | 423 for (auto& pair : tree_map_) { |
| 424 pair.second->ProcessCursorChanged(window, cursor_id, | 424 pair.second->ProcessCursorChanged(window, cursor_id, |
| 425 IsOperationSource(pair.first)); | 425 IsOperationSource(pair.first)); |
| 426 } | 426 } |
| 427 } | 427 } |
| 428 | 428 |
| 429 void WindowServer::SendToEventObservers(const ui::Event& event, | 429 void WindowServer::SendToPointerWatchers(const ui::Event& event, |
| 430 const UserId& user_id, | 430 const UserId& user_id, |
| 431 WindowTree* ignore_tree) { | 431 WindowTree* ignore_tree) { |
| 432 for (auto& pair : tree_map_) { | 432 for (auto& pair : tree_map_) { |
| 433 WindowTree* tree = pair.second.get(); | 433 WindowTree* tree = pair.second.get(); |
| 434 if (tree->user_id() == user_id && tree != ignore_tree) | 434 if (tree->user_id() == user_id && tree != ignore_tree) |
| 435 tree->SendToEventObserver(event); | 435 tree->SendToPointerWatcher(event); |
| 436 } | 436 } |
| 437 } | 437 } |
| 438 | 438 |
| 439 void WindowServer::SetPaintCallback( | 439 void WindowServer::SetPaintCallback( |
| 440 const base::Callback<void(ServerWindow*)>& callback) { | 440 const base::Callback<void(ServerWindow*)>& callback) { |
| 441 DCHECK(delegate_->IsTestConfig()) << "Paint callbacks are expensive, and " | 441 DCHECK(delegate_->IsTestConfig()) << "Paint callbacks are expensive, and " |
| 442 << "allowed only in tests."; | 442 << "allowed only in tests."; |
| 443 DCHECK(window_paint_callback_.is_null() || callback.is_null()); | 443 DCHECK(window_paint_callback_.is_null() || callback.is_null()); |
| 444 window_paint_callback_ = callback; | 444 window_paint_callback_ = callback; |
| 445 } | 445 } |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 778 clipboard_map_[id] = base::MakeUnique<clipboard::ClipboardImpl>(); | 778 clipboard_map_[id] = base::MakeUnique<clipboard::ClipboardImpl>(); |
| 779 } | 779 } |
| 780 | 780 |
| 781 void WindowServer::OnUserIdRemoved(const UserId& id) { | 781 void WindowServer::OnUserIdRemoved(const UserId& id) { |
| 782 activity_monitor_map_.erase(id); | 782 activity_monitor_map_.erase(id); |
| 783 clipboard_map_.erase(id); | 783 clipboard_map_.erase(id); |
| 784 } | 784 } |
| 785 | 785 |
| 786 } // namespace ws | 786 } // namespace ws |
| 787 } // namespace ui | 787 } // namespace ui |
| OLD | NEW |