OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "dbus/bus.h" | 5 #include "dbus/bus.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 connection_type(PRIVATE) { | 182 connection_type(PRIVATE) { |
183 } | 183 } |
184 | 184 |
185 Bus::Options::~Options() { | 185 Bus::Options::~Options() { |
186 } | 186 } |
187 | 187 |
188 Bus::Bus(const Options& options) | 188 Bus::Bus(const Options& options) |
189 : bus_type_(options.bus_type), | 189 : bus_type_(options.bus_type), |
190 connection_type_(options.connection_type), | 190 connection_type_(options.connection_type), |
191 dbus_task_runner_(options.dbus_task_runner), | 191 dbus_task_runner_(options.dbus_task_runner), |
192 on_shutdown_(false /* manual_reset */, false /* initially_signaled */), | 192 on_shutdown_(base::WaitableEvent::ResetPolicy::AUTOMATIC, |
| 193 base::WaitableEvent::InitialState::NOT_SIGNALED), |
193 connection_(NULL), | 194 connection_(NULL), |
194 origin_thread_id_(base::PlatformThread::CurrentId()), | 195 origin_thread_id_(base::PlatformThread::CurrentId()), |
195 async_operations_set_up_(false), | 196 async_operations_set_up_(false), |
196 shutdown_completed_(false), | 197 shutdown_completed_(false), |
197 num_pending_watches_(0), | 198 num_pending_watches_(0), |
198 num_pending_timeouts_(0), | 199 num_pending_timeouts_(0), |
199 address_(options.address) { | 200 address_(options.address) { |
200 // This is safe to call multiple times. | 201 // This is safe to call multiple times. |
201 dbus_threads_init_default(); | 202 dbus_threads_init_default(); |
202 // The origin message loop is unnecessary if the client uses synchronous | 203 // The origin message loop is unnecessary if the client uses synchronous |
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1214 kNameOwnerChangedSignal)) { | 1215 kNameOwnerChangedSignal)) { |
1215 Bus* self = static_cast<Bus*>(data); | 1216 Bus* self = static_cast<Bus*>(data); |
1216 self->OnServiceOwnerChanged(message); | 1217 self->OnServiceOwnerChanged(message); |
1217 } | 1218 } |
1218 // Always return unhandled to let others, e.g. ObjectProxies, handle the same | 1219 // Always return unhandled to let others, e.g. ObjectProxies, handle the same |
1219 // signal. | 1220 // signal. |
1220 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; | 1221 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; |
1221 } | 1222 } |
1222 | 1223 |
1223 } // namespace dbus | 1224 } // namespace dbus |
OLD | NEW |