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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_native_cursor_manager.cc

Issue 1539583003: Convert Pass()→std::move() in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/views/widget/desktop_aura/desktop_native_cursor_manager.h" 5 #include "ui/views/widget/desktop_aura/desktop_native_cursor_manager.h"
6 6
7 #include <utility>
8
7 #include "ui/aura/window_event_dispatcher.h" 9 #include "ui/aura/window_event_dispatcher.h"
8 #include "ui/aura/window_tree_host.h" 10 #include "ui/aura/window_tree_host.h"
9 #include "ui/base/cursor/cursor_loader.h" 11 #include "ui/base/cursor/cursor_loader.h"
10 #include "ui/views/widget/desktop_aura/desktop_cursor_loader_updater.h" 12 #include "ui/views/widget/desktop_aura/desktop_cursor_loader_updater.h"
11 13
12 namespace views { 14 namespace views {
13 15
14 DesktopNativeCursorManager::DesktopNativeCursorManager( 16 DesktopNativeCursorManager::DesktopNativeCursorManager(
15 scoped_ptr<DesktopCursorLoaderUpdater> cursor_loader_updater) 17 scoped_ptr<DesktopCursorLoaderUpdater> cursor_loader_updater)
16 : cursor_loader_updater_(cursor_loader_updater.Pass()), 18 : cursor_loader_updater_(std::move(cursor_loader_updater)),
17 cursor_loader_(ui::CursorLoader::Create()) { 19 cursor_loader_(ui::CursorLoader::Create()) {
18 if (cursor_loader_updater_.get()) 20 if (cursor_loader_updater_.get())
19 cursor_loader_updater_->OnCreate(1.0f, cursor_loader_.get()); 21 cursor_loader_updater_->OnCreate(1.0f, cursor_loader_.get());
20 } 22 }
21 23
22 DesktopNativeCursorManager::~DesktopNativeCursorManager() { 24 DesktopNativeCursorManager::~DesktopNativeCursorManager() {
23 } 25 }
24 26
25 gfx::NativeCursor DesktopNativeCursorManager::GetInitializedCursor(int type) { 27 gfx::NativeCursor DesktopNativeCursorManager::GetInitializedCursor(int type) {
26 gfx::NativeCursor cursor(type); 28 gfx::NativeCursor cursor(type);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // TODO(erg): In the ash version, we set the last mouse location on Env. I'm 96 // TODO(erg): In the ash version, we set the last mouse location on Env. I'm
95 // not sure this concept makes sense on the desktop. 97 // not sure this concept makes sense on the desktop.
96 98
97 SetVisibility(delegate->IsCursorVisible(), delegate); 99 SetVisibility(delegate->IsCursorVisible(), delegate);
98 100
99 for (Hosts::const_iterator i = hosts_.begin(); i != hosts_.end(); ++i) 101 for (Hosts::const_iterator i = hosts_.begin(); i != hosts_.end(); ++i)
100 (*i)->dispatcher()->OnMouseEventsEnableStateChanged(enabled); 102 (*i)->dispatcher()->OnMouseEventsEnableStateChanged(enabled);
101 } 103 }
102 104
103 } // namespace views 105 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698