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

Side by Side Diff: mojo/edk/system/platform_handle_dispatcher.h

Issue 1529303004: Convert Pass()→std::move() in mojo/edk/ (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 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 #ifndef MOJO_EDK_SYSTEM_PLATFORM_HANDLE_DISPATCHER_H_ 5 #ifndef MOJO_EDK_SYSTEM_PLATFORM_HANDLE_DISPATCHER_H_
6 #define MOJO_EDK_SYSTEM_PLATFORM_HANDLE_DISPATCHER_H_ 6 #define MOJO_EDK_SYSTEM_PLATFORM_HANDLE_DISPATCHER_H_
7 7
8 #include <utility>
9
8 #include "mojo/edk/embedder/scoped_platform_handle.h" 10 #include "mojo/edk/embedder/scoped_platform_handle.h"
9 #include "mojo/edk/system/simple_dispatcher.h" 11 #include "mojo/edk/system/simple_dispatcher.h"
10 #include "mojo/edk/system/system_impl_export.h" 12 #include "mojo/edk/system/system_impl_export.h"
11 #include "mojo/public/cpp/system/macros.h" 13 #include "mojo/public/cpp/system/macros.h"
12 14
13 namespace mojo { 15 namespace mojo {
14 namespace edk { 16 namespace edk {
15 17
16 // A dispatcher that simply wraps/transports a |PlatformHandle| (only for use by 18 // A dispatcher that simply wraps/transports a |PlatformHandle| (only for use by
17 // the embedder). 19 // the embedder).
18 class MOJO_SYSTEM_IMPL_EXPORT PlatformHandleDispatcher final 20 class MOJO_SYSTEM_IMPL_EXPORT PlatformHandleDispatcher final
19 : public SimpleDispatcher { 21 : public SimpleDispatcher {
20 public: 22 public:
21 static scoped_refptr<PlatformHandleDispatcher> Create( 23 static scoped_refptr<PlatformHandleDispatcher> Create(
22 ScopedPlatformHandle platform_handle) { 24 ScopedPlatformHandle platform_handle) {
23 return make_scoped_refptr( 25 return make_scoped_refptr(
24 new PlatformHandleDispatcher(platform_handle.Pass())); 26 new PlatformHandleDispatcher(std::move(platform_handle)));
25 } 27 }
26 28
27 ScopedPlatformHandle PassPlatformHandle(); 29 ScopedPlatformHandle PassPlatformHandle();
28 30
29 // |Dispatcher| public methods: 31 // |Dispatcher| public methods:
30 Type GetType() const override; 32 Type GetType() const override;
31 33
32 // The "opposite" of |SerializeAndClose()|. (Typically this is called by 34 // The "opposite" of |SerializeAndClose()|. (Typically this is called by
33 // |Dispatcher::Deserialize()|.) 35 // |Dispatcher::Deserialize()|.)
34 static scoped_refptr<PlatformHandleDispatcher> Deserialize( 36 static scoped_refptr<PlatformHandleDispatcher> Deserialize(
(...skipping 19 matching lines...) Expand all
54 56
55 ScopedPlatformHandle platform_handle_; 57 ScopedPlatformHandle platform_handle_;
56 58
57 MOJO_DISALLOW_COPY_AND_ASSIGN(PlatformHandleDispatcher); 59 MOJO_DISALLOW_COPY_AND_ASSIGN(PlatformHandleDispatcher);
58 }; 60 };
59 61
60 } // namespace edk 62 } // namespace edk
61 } // namespace mojo 63 } // namespace mojo
62 64
63 #endif // MOJO_EDK_SYSTEM_PLATFORM_HANDLE_DISPATCHER_H_ 65 #endif // MOJO_EDK_SYSTEM_PLATFORM_HANDLE_DISPATCHER_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/multiprocess_message_pipe_unittest.cc ('k') | mojo/edk/system/platform_handle_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698