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

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: include <utility> 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 <utility>
8
7 #include "ash/shell.h" 9 #include "ash/shell.h"
8 #include "base/bind.h" 10 #include "base/bind.h"
9 #include "base/callback.h" 11 #include "base/callback.h"
10 #include "base/location.h" 12 #include "base/location.h"
11 #include "remoting/host/chromeos/skia_bitmap_desktop_frame.h" 13 #include "remoting/host/chromeos/skia_bitmap_desktop_frame.h"
12 #include "third_party/webrtc/modules/desktop_capture/mouse_cursor.h" 14 #include "third_party/webrtc/modules/desktop_capture/mouse_cursor.h"
13 #include "ui/aura/env.h" 15 #include "ui/aura/env.h"
14 #include "ui/aura/window.h" 16 #include "ui/aura/window.h"
15 #include "ui/aura/window_tree_host.h" 17 #include "ui/aura/window_tree_host.h"
16 #include "ui/base/cursor/cursors_aura.h" 18 #include "ui/base/cursor/cursors_aura.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 cursor_hotspot.y() / scale_factor); 90 cursor_hotspot.y() / scale_factor);
89 91
90 if (cursor_hotspot.x() >= cursor_bitmap->width() || 92 if (cursor_hotspot.x() >= cursor_bitmap->width() ||
91 cursor_hotspot.y() >= cursor_bitmap->height()) { 93 cursor_hotspot.y() >= cursor_bitmap->height()) {
92 LOG(WARNING) << "Cursor hotspot is out of bounds for type: " 94 LOG(WARNING) << "Cursor hotspot is out of bounds for type: "
93 << cursor.native_type() << ". Setting to (0,0) instead"; 95 << cursor.native_type() << ". Setting to (0,0) instead";
94 cursor_hotspot.SetPoint(0, 0); 96 cursor_hotspot.SetPoint(0, 0);
95 } 97 }
96 98
97 scoped_ptr<webrtc::DesktopFrame> image( 99 scoped_ptr<webrtc::DesktopFrame> image(
98 SkiaBitmapDesktopFrame::Create(cursor_bitmap.Pass())); 100 SkiaBitmapDesktopFrame::Create(std::move(cursor_bitmap)));
99 scoped_ptr<webrtc::MouseCursor> cursor_shape(new webrtc::MouseCursor( 101 scoped_ptr<webrtc::MouseCursor> cursor_shape(new webrtc::MouseCursor(
100 image.release(), 102 image.release(),
101 webrtc::DesktopVector(cursor_hotspot.x(), cursor_hotspot.y()))); 103 webrtc::DesktopVector(cursor_hotspot.x(), cursor_hotspot.y())));
102 104
103 callback_->OnMouseCursor(cursor_shape.release()); 105 callback_->OnMouseCursor(cursor_shape.release());
104 } 106 }
105 107
106 } // namespace remoting 108 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/chromeos/clipboard_aura.cc ('k') | remoting/host/chromeos/skia_bitmap_desktop_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698