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

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

Issue 1949743002: EDK: HandleTransport::CreateEquivalentDispatcherAndClose() -> CreateEquivalentHandleAndClose(). (Closed) Base URL: https://github.com/domokit/mojo.git@work791_edk_handle_12-x-work790_edk_handle_11-x-work788_edk_handle_10
Patch Set: Created 4 years, 7 months 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
« no previous file with comments | « no previous file | mojo/edk/system/message_pipe.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_HANDLE_TRANSPORT_H_ 5 #ifndef MOJO_EDK_SYSTEM_HANDLE_TRANSPORT_H_
6 #define MOJO_EDK_SYSTEM_HANDLE_TRANSPORT_H_ 6 #define MOJO_EDK_SYSTEM_HANDLE_TRANSPORT_H_
7 7
8 #include "mojo/edk/system/dispatcher.h" 8 #include "mojo/edk/system/dispatcher.h"
9 #include "mojo/edk/system/handle.h" 9 #include "mojo/edk/system/handle.h"
10 #include "mojo/edk/util/ref_ptr.h" 10 #include "mojo/edk/util/ref_ptr.h"
(...skipping 17 matching lines...) Expand all
28 public: 28 public:
29 HandleTransport() : dispatcher_(nullptr), rights_(MOJO_HANDLE_RIGHT_NONE) {} 29 HandleTransport() : dispatcher_(nullptr), rights_(MOJO_HANDLE_RIGHT_NONE) {}
30 30
31 void End() MOJO_NOT_THREAD_SAFE; 31 void End() MOJO_NOT_THREAD_SAFE;
32 32
33 Dispatcher::Type GetType() const { return dispatcher_->GetType(); } 33 Dispatcher::Type GetType() const { return dispatcher_->GetType(); }
34 bool IsBusy() const MOJO_NOT_THREAD_SAFE { 34 bool IsBusy() const MOJO_NOT_THREAD_SAFE {
35 return dispatcher_->IsBusyNoLock(); 35 return dispatcher_->IsBusyNoLock();
36 } 36 }
37 void Close() MOJO_NOT_THREAD_SAFE { dispatcher_->CloseNoLock(); } 37 void Close() MOJO_NOT_THREAD_SAFE { dispatcher_->CloseNoLock(); }
38 util::RefPtr<Dispatcher> CreateEquivalentDispatcherAndClose( 38 Handle CreateEquivalentHandleAndClose(MessagePipe* message_pipe,
39 MessagePipe* message_pipe, 39 unsigned port) MOJO_NOT_THREAD_SAFE {
40 unsigned port) MOJO_NOT_THREAD_SAFE { 40 return Handle(dispatcher_->CreateEquivalentDispatcherAndCloseNoLock(
41 return dispatcher_->CreateEquivalentDispatcherAndCloseNoLock(message_pipe, 41 message_pipe, port),
42 port); 42 rights_);
43 } 43 }
44 44
45 bool is_valid() const { return !!dispatcher_; } 45 bool is_valid() const { return !!dispatcher_; }
46 46
47 private: 47 private:
48 friend class Dispatcher::HandleTableAccess; 48 friend class Dispatcher::HandleTableAccess;
49 49
50 explicit HandleTransport(const Handle& handle) 50 explicit HandleTransport(const Handle& handle)
51 : dispatcher_(handle.dispatcher.get()), rights_(handle.rights) {} 51 : dispatcher_(handle.dispatcher.get()), rights_(handle.rights) {}
52 52
53 Dispatcher* dispatcher_; 53 Dispatcher* dispatcher_;
54 MojoHandleRights rights_; 54 MojoHandleRights rights_;
55 55
56 // Copy and assign allowed. 56 // Copy and assign allowed.
57 }; 57 };
58 58
59 } // namespace system 59 } // namespace system
60 } // namespace mojo 60 } // namespace mojo
61 61
62 #endif // MOJO_EDK_SYSTEM_HANDLE_TRANSPORT_H_ 62 #endif // MOJO_EDK_SYSTEM_HANDLE_TRANSPORT_H_
OLDNEW
« no previous file with comments | « no previous file | mojo/edk/system/message_pipe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698