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

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

Issue 2378883002: mus ws: Consistently use mojom::Cursor instead of int32_t. (Closed)
Patch Set: Created 4 years, 2 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_server.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 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/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "services/shell/public/interfaces/connector.mojom.h" 10 #include "services/shell/public/interfaces/connector.mojom.h"
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 // Tests trigger calling this without a corresponding SetNativeCapture(). 520 // Tests trigger calling this without a corresponding SetNativeCapture().
521 // TODO(sky): maybe abstract this away so that DCHECK can be added? 521 // TODO(sky): maybe abstract this away so that DCHECK can be added?
522 if (!platform_display_with_capture_) 522 if (!platform_display_with_capture_)
523 return; 523 return;
524 524
525 platform_display_with_capture_->ReleaseCapture(); 525 platform_display_with_capture_->ReleaseCapture();
526 platform_display_with_capture_ = nullptr; 526 platform_display_with_capture_ = nullptr;
527 } 527 }
528 528
529 void WindowManagerState::UpdateNativeCursorFromDispatcher() { 529 void WindowManagerState::UpdateNativeCursorFromDispatcher() {
530 int32_t cursor_id = 0; 530 ui::mojom::Cursor cursor_id = mojom::Cursor::CURSOR_NULL;
531 if (event_dispatcher_.GetCurrentMouseCursor(&cursor_id)) { 531 if (event_dispatcher_.GetCurrentMouseCursor(&cursor_id)) {
532 for (Display* display : display_manager()->displays()) 532 for (Display* display : display_manager()->displays())
533 display->UpdateNativeCursor(cursor_id); 533 display->UpdateNativeCursor(cursor_id);
534 } 534 }
535 } 535 }
536 536
537 void WindowManagerState::OnCaptureChanged(ServerWindow* new_capture, 537 void WindowManagerState::OnCaptureChanged(ServerWindow* new_capture,
538 ServerWindow* old_capture) { 538 ServerWindow* old_capture) {
539 window_server()->ProcessCaptureChanged(new_capture, old_capture); 539 window_server()->ProcessCaptureChanged(new_capture, old_capture);
540 } 540 }
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 window->RemoveObserver(this); 635 window->RemoveObserver(this);
636 orphaned_window_manager_display_roots_.erase(iter); 636 orphaned_window_manager_display_roots_.erase(iter);
637 return; 637 return;
638 } 638 }
639 } 639 }
640 NOTREACHED(); 640 NOTREACHED();
641 } 641 }
642 642
643 } // namespace ws 643 } // namespace ws
644 } // namespace ui 644 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/test_utils.cc ('k') | services/ui/ws/window_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698