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 #include "mojo/common/message_pump_mojo.h" | 5 #include "mojo/common/message_pump_mojo.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/time/time.h" |
11 #include "mojo/common/message_pump_mojo_handler.h" | 12 #include "mojo/common/message_pump_mojo_handler.h" |
12 #include "mojo/common/scoped_message_pipe.h" | 13 #include "mojo/common/scoped_message_pipe.h" |
13 | 14 |
14 namespace mojo { | 15 namespace mojo { |
15 namespace common { | 16 namespace common { |
16 | 17 |
17 // State needed for one iteration of MojoWaitMany. The first handle and flags | 18 // State needed for one iteration of MojoWaitMany. The first handle and flags |
18 // corresponds to that of the control pipe. | 19 // corresponds to that of the control pipe. |
19 struct MessagePumpMojo::WaitState { | 20 struct MessagePumpMojo::WaitState { |
20 std::vector<MojoHandle> handles; | 21 std::vector<MojoHandle> handles; |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 for (HandleToHandler::const_iterator i = handlers_.begin(); | 190 for (HandleToHandler::const_iterator i = handlers_.begin(); |
190 i != handlers_.end(); ++i) { | 191 i != handlers_.end(); ++i) { |
191 wait_state.handles.push_back(i->first); | 192 wait_state.handles.push_back(i->first); |
192 wait_state.wait_flags.push_back(i->second.wait_flags); | 193 wait_state.wait_flags.push_back(i->second.wait_flags); |
193 } | 194 } |
194 return wait_state; | 195 return wait_state; |
195 } | 196 } |
196 | 197 |
197 } // namespace common | 198 } // namespace common |
198 } // namespace mojo | 199 } // namespace mojo |
OLD | NEW |