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

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/event_emitter.h

Issue 303223007: [NaCl SDK] nacl_io: Run clang-format over nacl_io sources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 /* Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2013 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 LIBRARIES_NACL_IO_EVENT_EMITTER_H_ 5 #ifndef LIBRARIES_NACL_IO_EVENT_EMITTER_H_
6 #define LIBRARIES_NACL_IO_EVENT_EMITTER_H_ 6 #define LIBRARIES_NACL_IO_EVENT_EMITTER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
11 #include <set> 11 #include <set>
12 12
13 #include "nacl_io/error.h" 13 #include "nacl_io/error.h"
14 14
15 #include "sdk_util/auto_lock.h" 15 #include "sdk_util/auto_lock.h"
16 #include "sdk_util/macros.h" 16 #include "sdk_util/macros.h"
17 #include "sdk_util/ref_object.h" 17 #include "sdk_util/ref_object.h"
18 #include "sdk_util/scoped_ref.h" 18 #include "sdk_util/scoped_ref.h"
19 #include "sdk_util/simple_lock.h" 19 #include "sdk_util/simple_lock.h"
20 20
21 namespace nacl_io { 21 namespace nacl_io {
22 22
23 class EventEmitter; 23 class EventEmitter;
24 class EventListener; 24 class EventListener;
25 25
26
27 typedef sdk_util::ScopedRef<EventEmitter> ScopedEventEmitter; 26 typedef sdk_util::ScopedRef<EventEmitter> ScopedEventEmitter;
28 typedef std::map<EventListener*, uint32_t> EventListenerMap_t; 27 typedef std::map<EventListener*, uint32_t> EventListenerMap_t;
29 28
30 bool operator<(const ScopedEventEmitter& src_a, 29 bool operator<(const ScopedEventEmitter& src_a,
31 const ScopedEventEmitter& src_b); 30 const ScopedEventEmitter& src_b);
32 31
33 // EventEmitter 32 // EventEmitter
34 // 33 //
35 // The EventEmitter class provides notification of events to EventListeners 34 // The EventEmitter class provides notification of events to EventListeners
36 // by registering EventInfo objects and signaling the EventListener 35 // by registering EventInfo objects and signaling the EventListener
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 70
72 private: 71 private:
73 uint32_t event_status_; 72 uint32_t event_status_;
74 sdk_util::SimpleLock emitter_lock_; 73 sdk_util::SimpleLock emitter_lock_;
75 EventListenerMap_t listeners_; 74 EventListenerMap_t listeners_;
76 DISALLOW_COPY_AND_ASSIGN(EventEmitter); 75 DISALLOW_COPY_AND_ASSIGN(EventEmitter);
77 }; 76 };
78 77
79 } // namespace nacl_io 78 } // namespace nacl_io
80 79
81
82 #endif // LIBRARIES_NACL_IO_EVENT_EMITTER_H_ 80 #endif // LIBRARIES_NACL_IO_EVENT_EMITTER_H_
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/dir_node.cc ('k') | native_client_sdk/src/libraries/nacl_io/event_emitter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698