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

Side by Side Diff: remoting/host/chromeos/mouse_cursor_monitor_aura.cc

Issue 1549493004: Use std::move() instead of .Pass() in remoting/host (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_not_pass
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 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 "remoting/host/chromeos/mouse_cursor_monitor_aura.h" 5 #include "remoting/host/chromeos/mouse_cursor_monitor_aura.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 cursor_hotspot.y() / scale_factor); 88 cursor_hotspot.y() / scale_factor);
89 89
90 if (cursor_hotspot.x() >= cursor_bitmap->width() || 90 if (cursor_hotspot.x() >= cursor_bitmap->width() ||
91 cursor_hotspot.y() >= cursor_bitmap->height()) { 91 cursor_hotspot.y() >= cursor_bitmap->height()) {
92 LOG(WARNING) << "Cursor hotspot is out of bounds for type: " 92 LOG(WARNING) << "Cursor hotspot is out of bounds for type: "
93 << cursor.native_type() << ". Setting to (0,0) instead"; 93 << cursor.native_type() << ". Setting to (0,0) instead";
94 cursor_hotspot.SetPoint(0, 0); 94 cursor_hotspot.SetPoint(0, 0);
95 } 95 }
96 96
97 scoped_ptr<webrtc::DesktopFrame> image( 97 scoped_ptr<webrtc::DesktopFrame> image(
98 SkiaBitmapDesktopFrame::Create(cursor_bitmap.Pass())); 98 SkiaBitmapDesktopFrame::Create(std::move(cursor_bitmap)));
99 scoped_ptr<webrtc::MouseCursor> cursor_shape(new webrtc::MouseCursor( 99 scoped_ptr<webrtc::MouseCursor> cursor_shape(new webrtc::MouseCursor(
100 image.release(), 100 image.release(),
101 webrtc::DesktopVector(cursor_hotspot.x(), cursor_hotspot.y()))); 101 webrtc::DesktopVector(cursor_hotspot.x(), cursor_hotspot.y())));
102 102
103 callback_->OnMouseCursor(cursor_shape.release()); 103 callback_->OnMouseCursor(cursor_shape.release());
104 } 104 }
105 105
106 } // namespace remoting 106 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698