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 "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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 418 ServerWindow* window, mojom::Cursor cursor_id) { | 418 ServerWindow* window, mojom::Cursor cursor_id) { |
| 419 for (auto& pair : tree_map_) { | 419 for (auto& pair : tree_map_) { |
| 420 pair.second->ProcessCursorChanged(window, cursor_id, | 420 pair.second->ProcessCursorChanged(window, cursor_id, |
| 421 IsOperationSource(pair.first)); | 421 IsOperationSource(pair.first)); |
| 422 } | 422 } |
| 423 } | 423 } |
| 424 | 424 |
| 425 void WindowServer::SendToPointerWatchers(const ui::Event& event, | 425 void WindowServer::SendToPointerWatchers(const ui::Event& event, |
| 426 const UserId& user_id, | 426 const UserId& user_id, |
| 427 ServerWindow* target_window, | 427 ServerWindow* target_window, |
| 428 WindowTree* ignore_tree) { | 428 WindowTree* ignore_tree, |
| 429 int64_t display_id) { | |
|
sadrul
2017/02/09 02:27:45
Can this figure out the display-id here from |targ
sky
2017/02/09 17:06:20
See my earlier comment as to why this passes in th
| |
| 429 for (auto& pair : tree_map_) { | 430 for (auto& pair : tree_map_) { |
| 430 WindowTree* tree = pair.second.get(); | 431 WindowTree* tree = pair.second.get(); |
| 431 if (tree->user_id() == user_id && tree != ignore_tree) | 432 if (tree->user_id() == user_id && tree != ignore_tree) |
| 432 tree->SendToPointerWatcher(event, target_window); | 433 tree->SendToPointerWatcher(event, target_window, display_id); |
| 433 } | 434 } |
| 434 } | 435 } |
| 435 | 436 |
| 436 void WindowServer::SetPaintCallback( | 437 void WindowServer::SetPaintCallback( |
| 437 const base::Callback<void(ServerWindow*)>& callback) { | 438 const base::Callback<void(ServerWindow*)>& callback) { |
| 438 DCHECK(delegate_->IsTestConfig()) << "Paint callbacks are expensive, and " | 439 DCHECK(delegate_->IsTestConfig()) << "Paint callbacks are expensive, and " |
| 439 << "allowed only in tests."; | 440 << "allowed only in tests."; |
| 440 DCHECK(window_paint_callback_.is_null() || callback.is_null()); | 441 DCHECK(window_paint_callback_.is_null() || callback.is_null()); |
| 441 window_paint_callback_ = callback; | 442 window_paint_callback_ = callback; |
| 442 } | 443 } |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 811 void WindowServer::OnUserIdAdded(const UserId& id) { | 812 void WindowServer::OnUserIdAdded(const UserId& id) { |
| 812 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr); | 813 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr); |
| 813 } | 814 } |
| 814 | 815 |
| 815 void WindowServer::OnUserIdRemoved(const UserId& id) { | 816 void WindowServer::OnUserIdRemoved(const UserId& id) { |
| 816 activity_monitor_map_.erase(id); | 817 activity_monitor_map_.erase(id); |
| 817 } | 818 } |
| 818 | 819 |
| 819 } // namespace ws | 820 } // namespace ws |
| 820 } // namespace ui | 821 } // namespace ui |
| OLD | NEW |