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

Side by Side Diff: remoting/host/chromeos/clipboard_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/clipboard_aura.h" 5 #include "remoting/host/chromeos/clipboard_aura.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "remoting/base/constants.h" 8 #include "remoting/base/constants.h"
9 #include "remoting/proto/event.pb.h" 9 #include "remoting/proto/event.pb.h"
10 #include "remoting/protocol/clipboard_stub.h" 10 #include "remoting/protocol/clipboard_stub.h"
(...skipping 15 matching lines...) Expand all
26 base::TimeDelta::FromMilliseconds(kClipboardPollingIntervalMs)) { 26 base::TimeDelta::FromMilliseconds(kClipboardPollingIntervalMs)) {
27 } 27 }
28 28
29 ClipboardAura::~ClipboardAura() { 29 ClipboardAura::~ClipboardAura() {
30 } 30 }
31 31
32 void ClipboardAura::Start( 32 void ClipboardAura::Start(
33 scoped_ptr<protocol::ClipboardStub> client_clipboard) { 33 scoped_ptr<protocol::ClipboardStub> client_clipboard) {
34 DCHECK(thread_checker_.CalledOnValidThread()); 34 DCHECK(thread_checker_.CalledOnValidThread());
35 35
36 client_clipboard_ = client_clipboard.Pass(); 36 client_clipboard_ = std::move(client_clipboard);
37 37
38 // Aura doesn't provide a clipboard-changed notification. The only way to 38 // Aura doesn't provide a clipboard-changed notification. The only way to
39 // detect clipboard changes is by polling. 39 // detect clipboard changes is by polling.
40 clipboard_polling_timer_.Start(FROM_HERE, polling_interval_, this, 40 clipboard_polling_timer_.Start(FROM_HERE, polling_interval_, this,
41 &ClipboardAura::CheckClipboardForChanges); 41 &ClipboardAura::CheckClipboardForChanges);
42 } 42 }
43 43
44 void ClipboardAura::InjectClipboardEvent( 44 void ClipboardAura::InjectClipboardEvent(
45 const protocol::ClipboardEvent& event) { 45 const protocol::ClipboardEvent& event) {
46 DCHECK(thread_checker_.CalledOnValidThread()); 46 DCHECK(thread_checker_.CalledOnValidThread());
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 event.set_data(data); 86 event.set_data(data);
87 87
88 client_clipboard_->InjectClipboardEvent(event); 88 client_clipboard_->InjectClipboardEvent(event);
89 } 89 }
90 90
91 scoped_ptr<Clipboard> Clipboard::Create() { 91 scoped_ptr<Clipboard> Clipboard::Create() {
92 return make_scoped_ptr(new ClipboardAura()); 92 return make_scoped_ptr(new ClipboardAura());
93 } 93 }
94 94
95 } // namespace remoting 95 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698