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

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

Issue 2830703003: [views-mus] Support custom cursors. (Closed)
Patch Set: fix cast_shell_linux Created 3 years, 7 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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 pair.second->ProcessWindowReorder(window, relative_window, direction, 410 pair.second->ProcessWindowReorder(window, relative_window, direction,
411 IsOperationSource(pair.first)); 411 IsOperationSource(pair.first));
412 } 412 }
413 } 413 }
414 414
415 void WindowServer::ProcessWindowDeleted(ServerWindow* window) { 415 void WindowServer::ProcessWindowDeleted(ServerWindow* window) {
416 for (auto& pair : tree_map_) 416 for (auto& pair : tree_map_)
417 pair.second->ProcessWindowDeleted(window, IsOperationSource(pair.first)); 417 pair.second->ProcessWindowDeleted(window, IsOperationSource(pair.first));
418 } 418 }
419 419
420 void WindowServer::ProcessWillChangeWindowPredefinedCursor( 420 void WindowServer::ProcessWillChangeWindowCursor(ServerWindow* window,
421 ServerWindow* window, 421 const ui::CursorData& cursor) {
422 mojom::CursorType cursor_id) {
423 for (auto& pair : tree_map_) { 422 for (auto& pair : tree_map_) {
424 pair.second->ProcessCursorChanged(window, cursor_id, 423 pair.second->ProcessCursorChanged(window, cursor,
425 IsOperationSource(pair.first)); 424 IsOperationSource(pair.first));
426 } 425 }
427 } 426 }
428 427
429 void WindowServer::SendToPointerWatchers(const ui::Event& event, 428 void WindowServer::SendToPointerWatchers(const ui::Event& event,
430 const UserId& user_id, 429 const UserId& user_id,
431 ServerWindow* target_window, 430 ServerWindow* target_window,
432 WindowTree* ignore_tree, 431 WindowTree* ignore_tree,
433 int64_t display_id) { 432 int64_t display_id) {
434 for (auto& pair : tree_map_) { 433 for (auto& pair : tree_map_) {
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 if (in_destructor_) 742 if (in_destructor_)
744 return; 743 return;
745 744
746 WindowManagerDisplayRoot* display_root = 745 WindowManagerDisplayRoot* display_root =
747 display_manager_->GetWindowManagerDisplayRoot(window); 746 display_manager_->GetWindowManagerDisplayRoot(window);
748 if (display_root) 747 if (display_root)
749 display_root->window_manager_state()->ReleaseCaptureBlockedByModalWindow( 748 display_root->window_manager_state()->ReleaseCaptureBlockedByModalWindow(
750 window); 749 window);
751 } 750 }
752 751
753 void WindowServer::OnWindowPredefinedCursorChanged( 752 void WindowServer::OnWindowCursorChanged(ServerWindow* window,
754 ServerWindow* window, 753 const ui::CursorData& cursor) {
755 mojom::CursorType cursor_id) {
756 if (in_destructor_) 754 if (in_destructor_)
757 return; 755 return;
758 756
759 ProcessWillChangeWindowPredefinedCursor(window, cursor_id); 757 ProcessWillChangeWindowCursor(window, cursor);
760 758
761 UpdateNativeCursorIfOver(window); 759 UpdateNativeCursorIfOver(window);
762 } 760 }
763 761
764 void WindowServer::OnWindowNonClientCursorChanged(ServerWindow* window, 762 void WindowServer::OnWindowNonClientCursorChanged(
765 mojom::CursorType cursor_id) { 763 ServerWindow* window,
764 const ui::CursorData& cursor) {
766 if (in_destructor_) 765 if (in_destructor_)
767 return; 766 return;
768 767
769 UpdateNativeCursorIfOver(window); 768 UpdateNativeCursorIfOver(window);
770 } 769 }
771 770
772 void WindowServer::OnWindowSharedPropertyChanged( 771 void WindowServer::OnWindowSharedPropertyChanged(
773 ServerWindow* window, 772 ServerWindow* window,
774 const std::string& name, 773 const std::string& name,
775 const std::vector<uint8_t>* new_data) { 774 const std::vector<uint8_t>* new_data) {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 void WindowServer::OnUserIdAdded(const UserId& id) { 855 void WindowServer::OnUserIdAdded(const UserId& id) {
857 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr); 856 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr);
858 } 857 }
859 858
860 void WindowServer::OnUserIdRemoved(const UserId& id) { 859 void WindowServer::OnUserIdRemoved(const UserId& id) {
861 activity_monitor_map_.erase(id); 860 activity_monitor_map_.erase(id);
862 } 861 }
863 862
864 } // namespace ws 863 } // namespace ws
865 } // namespace ui 864 } // 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