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

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

Issue 1350023003: Add a Mojo EDK for Chrome that uses one OS pipe per message pipe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more cleanup Created 5 years, 2 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
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 THIRD_PARTY_MOJO_SRC_MOJO_EDK_SYSTEM_HANDLE_SIGNALS_STATE_H_ 5 #ifndef MOJO_EDK_SYSTEM_HANDLE_SIGNALS_STATE_H_
6 #define THIRD_PARTY_MOJO_SRC_MOJO_EDK_SYSTEM_HANDLE_SIGNALS_STATE_H_ 6 #define MOJO_EDK_SYSTEM_HANDLE_SIGNALS_STATE_H_
7 7
8 #include "mojo/edk/system/system_impl_export.h"
8 #include "mojo/public/c/system/types.h" 9 #include "mojo/public/c/system/types.h"
9 #include "third_party/mojo/src/mojo/edk/system/system_impl_export.h"
10 10
11 namespace mojo { 11 namespace mojo {
12 namespace system { 12 namespace edk {
13 13
14 // Just "add" some constructors and methods to the C struct 14 // Just "add" some constructors and methods to the C struct
15 // |MojoHandleSignalsState| (for convenience). This should add no overhead. 15 // |MojoHandleSignalsState| (for convenience). This should add no overhead.
16 struct MOJO_SYSTEM_IMPL_EXPORT HandleSignalsState final 16 struct MOJO_SYSTEM_IMPL_EXPORT HandleSignalsState final
17 : public MojoHandleSignalsState { 17 : public MojoHandleSignalsState {
18 HandleSignalsState() { 18 HandleSignalsState() {
19 satisfied_signals = MOJO_HANDLE_SIGNAL_NONE; 19 satisfied_signals = MOJO_HANDLE_SIGNAL_NONE;
20 satisfiable_signals = MOJO_HANDLE_SIGNAL_NONE; 20 satisfiable_signals = MOJO_HANDLE_SIGNAL_NONE;
21 } 21 }
22 HandleSignalsState(MojoHandleSignals satisfied, 22 HandleSignalsState(MojoHandleSignals satisfied,
(...skipping 13 matching lines...) Expand all
36 36
37 bool can_satisfy(MojoHandleSignals signals) const { 37 bool can_satisfy(MojoHandleSignals signals) const {
38 return !!(satisfiable_signals & signals); 38 return !!(satisfiable_signals & signals);
39 } 39 }
40 40
41 // (Copy and assignment allowed.) 41 // (Copy and assignment allowed.)
42 }; 42 };
43 static_assert(sizeof(HandleSignalsState) == sizeof(MojoHandleSignalsState), 43 static_assert(sizeof(HandleSignalsState) == sizeof(MojoHandleSignalsState),
44 "HandleSignalsState should add no overhead"); 44 "HandleSignalsState should add no overhead");
45 45
46 } // namespace system 46 } // namespace edk
47 } // namespace mojo 47 } // namespace mojo
48 48
49 #endif // THIRD_PARTY_MOJO_SRC_MOJO_EDK_SYSTEM_HANDLE_SIGNALS_STATE_H_ 49 #endif // MOJO_EDK_SYSTEM_HANDLE_SIGNALS_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698