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

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

Issue 2784663003: mus: Rename mojom::Cursor to mojom::CursorType. (Closed)
Patch Set: Created 3 years, 8 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/test_utils.cc ('k') | services/ui/ws/window_manager_state_unittest.cc » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_manager_state.h" 5 #include "services/ui/ws/window_manager_state.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 // Tests trigger calling this without a corresponding SetNativeCapture(). 557 // Tests trigger calling this without a corresponding SetNativeCapture().
558 // TODO(sky): maybe abstract this away so that DCHECK can be added? 558 // TODO(sky): maybe abstract this away so that DCHECK can be added?
559 if (!platform_display_with_capture_) 559 if (!platform_display_with_capture_)
560 return; 560 return;
561 561
562 platform_display_with_capture_->ReleaseCapture(); 562 platform_display_with_capture_->ReleaseCapture();
563 platform_display_with_capture_ = nullptr; 563 platform_display_with_capture_ = nullptr;
564 } 564 }
565 565
566 void WindowManagerState::UpdateNativeCursorFromDispatcher() { 566 void WindowManagerState::UpdateNativeCursorFromDispatcher() {
567 const ui::mojom::Cursor cursor_id = event_dispatcher_.GetCurrentMouseCursor(); 567 const ui::mojom::CursorType cursor_id =
568 event_dispatcher_.GetCurrentMouseCursor();
568 for (Display* display : display_manager()->displays()) 569 for (Display* display : display_manager()->displays())
569 display->UpdateNativeCursor(cursor_id); 570 display->UpdateNativeCursor(cursor_id);
570 } 571 }
571 572
572 void WindowManagerState::OnCaptureChanged(ServerWindow* new_capture, 573 void WindowManagerState::OnCaptureChanged(ServerWindow* new_capture,
573 ServerWindow* old_capture) { 574 ServerWindow* old_capture) {
574 window_server()->ProcessCaptureChanged(new_capture, old_capture); 575 window_server()->ProcessCaptureChanged(new_capture, old_capture);
575 } 576 }
576 577
577 void WindowManagerState::OnMouseCursorLocationChanged(const gfx::Point& point) { 578 void WindowManagerState::OnMouseCursorLocationChanged(const gfx::Point& point) {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 window->RemoveObserver(this); 677 window->RemoveObserver(this);
677 orphaned_window_manager_display_roots_.erase(iter); 678 orphaned_window_manager_display_roots_.erase(iter);
678 return; 679 return;
679 } 680 }
680 } 681 }
681 NOTREACHED(); 682 NOTREACHED();
682 } 683 }
683 684
684 } // namespace ws 685 } // namespace ws
685 } // namespace ui 686 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/test_utils.cc ('k') | services/ui/ws/window_manager_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698