Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(311)

Side by Side Diff: services/ui/ws/window_server.cc

Issue 2685883003: chromeos: converts observed pointer events to DIPs (Closed)
Patch Set: merge Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « services/ui/ws/window_server.h ('k') | services/ui/ws/window_tree.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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) {
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
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
OLDNEW
« no previous file with comments | « services/ui/ws/window_server.h ('k') | services/ui/ws/window_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698