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

Unified Diff: remoting/host/single_window_input_injector_mac.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/single_window_desktop_environment.cc ('k') | remoting/host/token_validator_factory_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/single_window_input_injector_mac.cc
diff --git a/remoting/host/single_window_input_injector_mac.cc b/remoting/host/single_window_input_injector_mac.cc
index fe64312733a70c15cd0e3c2f5fc7f7b6c018bb48..3954fe726e554c06668b71fd1fdffc260061655b 100644
--- a/remoting/host/single_window_input_injector_mac.cc
+++ b/remoting/host/single_window_input_injector_mac.cc
@@ -7,6 +7,8 @@
#include <ApplicationServices/ApplicationServices.h>
#include <Carbon/Carbon.h>
+#include <utility>
+
#include "base/mac/foundation_util.h"
#include "base/mac/scoped_cftyperef.h"
#include "base/macros.h"
@@ -49,15 +51,13 @@ SingleWindowInputInjectorMac::SingleWindowInputInjectorMac(
webrtc::WindowId window_id,
scoped_ptr<InputInjector> input_injector)
: window_id_(static_cast<CGWindowID>(window_id)),
- input_injector_(input_injector.Pass()) {
-}
+ input_injector_(std::move(input_injector)) {}
-SingleWindowInputInjectorMac::~SingleWindowInputInjectorMac() {
-}
+SingleWindowInputInjectorMac::~SingleWindowInputInjectorMac() {}
void SingleWindowInputInjectorMac::Start(
scoped_ptr<protocol::ClipboardStub> client_clipboard) {
- input_injector_->Start(client_clipboard.Pass());
+ input_injector_->Start(std::move(client_clipboard));
}
void SingleWindowInputInjectorMac::InjectKeyEvent(const KeyEvent& event) {
@@ -164,9 +164,8 @@ CGRect SingleWindowInputInjectorMac::FindCGRectOfWindow() {
scoped_ptr<InputInjector> SingleWindowInputInjector::CreateForWindow(
webrtc::WindowId window_id,
scoped_ptr<InputInjector> input_injector) {
- scoped_ptr<SingleWindowInputInjectorMac> injector(
- new SingleWindowInputInjectorMac(window_id, input_injector.Pass()));
- return injector.Pass();
+ return make_scoped_ptr(
+ new SingleWindowInputInjectorMac(window_id, std::move(input_injector)));
}
} // namespace remoting
« no previous file with comments | « remoting/host/single_window_desktop_environment.cc ('k') | remoting/host/token_validator_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698