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

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

Issue 1946763002: EDK: Add MojoHandleRights to DispatcherTransport. (Closed) Base URL: https://github.com/domokit/mojo.git@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 | « mojo/edk/system/dispatcher.cc ('k') | mojo/edk/system/handle_table.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_H_ 5 #ifndef MOJO_EDK_SYSTEM_HANDLE_H_
6 #define MOJO_EDK_SYSTEM_HANDLE_H_ 6 #define MOJO_EDK_SYSTEM_HANDLE_H_
7 7
8 #include "mojo/edk/util/ref_ptr.h" 8 #include "mojo/edk/util/ref_ptr.h"
9 #include "mojo/public/c/system/handle.h" 9 #include "mojo/public/c/system/handle.h"
10 10
(...skipping 15 matching lines...) Expand all
26 Handle(util::RefPtr<Dispatcher>&& dispatcher, MojoHandleRights rights); 26 Handle(util::RefPtr<Dispatcher>&& dispatcher, MojoHandleRights rights);
27 27
28 ~Handle(); 28 ~Handle();
29 29
30 Handle& operator=(const Handle&); 30 Handle& operator=(const Handle&);
31 Handle& operator=(Handle&&); 31 Handle& operator=(Handle&&);
32 32
33 // A |Handle| tests as true if it actually has a dispatcher. 33 // A |Handle| tests as true if it actually has a dispatcher.
34 explicit operator bool() const { return !!dispatcher; } 34 explicit operator bool() const { return !!dispatcher; }
35 35
36 void reset() { *this = Handle(); }
37
36 // Note: |dispatcher| is guaranteed to be null if default-constructed or 38 // Note: |dispatcher| is guaranteed to be null if default-constructed or
37 // moved-from, but we make no guarantees about the value of |rights| in either 39 // moved-from, but we make no guarantees about the value of |rights| in either
38 // case. 40 // case.
39 util::RefPtr<Dispatcher> dispatcher; 41 util::RefPtr<Dispatcher> dispatcher;
40 MojoHandleRights rights; 42 MojoHandleRights rights;
41 }; 43 };
42 44
43 } // namespace system 45 } // namespace system
44 } // namespace mojo 46 } // namespace mojo
45 47
46 #endif // MOJO_EDK_SYSTEM_HANDLE_H_ 48 #endif // MOJO_EDK_SYSTEM_HANDLE_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/dispatcher.cc ('k') | mojo/edk/system/handle_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698