OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 MOJO_PUBLIC_CPP_UTILITY_RUN_LOOP_H_ | 5 #ifndef MOJO_PUBLIC_CPP_UTILITY_RUN_LOOP_H_ |
6 #define MOJO_PUBLIC_CPP_UTILITY_RUN_LOOP_H_ | 6 #define MOJO_PUBLIC_CPP_UTILITY_RUN_LOOP_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "mojo/public/cpp/system/core.h" | 10 #include "mojo/public/cpp/system/core.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 void Quit(); | 50 void Quit(); |
51 | 51 |
52 private: | 52 private: |
53 struct RunState; | 53 struct RunState; |
54 struct WaitState; | 54 struct WaitState; |
55 | 55 |
56 // Contains the data needed to track a request to AddHandler(). | 56 // Contains the data needed to track a request to AddHandler(). |
57 struct HandlerData { | 57 struct HandlerData { |
58 HandlerData() | 58 HandlerData() |
59 : handler(NULL), | 59 : handler(NULL), |
60 handle_signals(MOJO_WAIT_FLAG_NONE), | 60 handle_signals(MOJO_HANDLE_SIGNAL_NONE), |
61 deadline(0), | 61 deadline(0), |
62 id(0) {} | 62 id(0) {} |
63 | 63 |
64 RunLoopHandler* handler; | 64 RunLoopHandler* handler; |
65 MojoHandleSignals handle_signals; | 65 MojoHandleSignals handle_signals; |
66 MojoTimeTicks deadline; | 66 MojoTimeTicks deadline; |
67 // See description of |RunLoop::next_handler_id_| for details. | 67 // See description of |RunLoop::next_handler_id_| for details. |
68 int id; | 68 int id; |
69 }; | 69 }; |
70 | 70 |
(...skipping 28 matching lines...) Expand all Loading... |
99 // match it means the handler was removed then added so that we shouldn't | 99 // match it means the handler was removed then added so that we shouldn't |
100 // notify it. | 100 // notify it. |
101 int next_handler_id_; | 101 int next_handler_id_; |
102 | 102 |
103 MOJO_DISALLOW_COPY_AND_ASSIGN(RunLoop); | 103 MOJO_DISALLOW_COPY_AND_ASSIGN(RunLoop); |
104 }; | 104 }; |
105 | 105 |
106 } // namespace mojo | 106 } // namespace mojo |
107 | 107 |
108 #endif // MOJO_PUBLIC_CPP_UTILITY_RUN_LOOP_H_ | 108 #endif // MOJO_PUBLIC_CPP_UTILITY_RUN_LOOP_H_ |
OLD | NEW |