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 #ifndef DBUS_BUS_H_ | 5 #ifndef DBUS_BUS_H_ |
6 #define DBUS_BUS_H_ | 6 #define DBUS_BUS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 virtual void PostTaskToDBusThread( | 375 virtual void PostTaskToDBusThread( |
376 const tracked_objects::Location& from_here, | 376 const tracked_objects::Location& from_here, |
377 const base::Closure& task); | 377 const base::Closure& task); |
378 | 378 |
379 // Posts the delayed task to the message loop of the D-Bus thread. If | 379 // Posts the delayed task to the message loop of the D-Bus thread. If |
380 // D-Bus thread is not supplied, the message loop of the origin thread | 380 // D-Bus thread is not supplied, the message loop of the origin thread |
381 // will be used. | 381 // will be used. |
382 virtual void PostDelayedTaskToDBusThread( | 382 virtual void PostDelayedTaskToDBusThread( |
383 const tracked_objects::Location& from_here, | 383 const tracked_objects::Location& from_here, |
384 const base::Closure& task, | 384 const base::Closure& task, |
385 int delay_ms); | 385 base::TimeDelta delay); |
386 | 386 |
387 // Returns true if the bus has the D-Bus thread. | 387 // Returns true if the bus has the D-Bus thread. |
388 virtual bool HasDBusThread(); | 388 virtual bool HasDBusThread(); |
389 | 389 |
390 // Check whether the current thread is on the origin thread (the thread | 390 // Check whether the current thread is on the origin thread (the thread |
391 // that created the bus). If not, DCHECK will fail. | 391 // that created the bus). If not, DCHECK will fail. |
392 virtual void AssertOnOriginThread(); | 392 virtual void AssertOnOriginThread(); |
393 | 393 |
394 // Check whether the current thread is on the D-Bus thread. If not, | 394 // Check whether the current thread is on the D-Bus thread. If not, |
395 // DCHECK will fail. If the D-Bus thread is not supplied, it calls | 395 // DCHECK will fail. If the D-Bus thread is not supplied, it calls |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 // OnAddTimeout()/OnRemoveTimeou() are balanced. | 489 // OnAddTimeout()/OnRemoveTimeou() are balanced. |
490 int num_pending_watches_; | 490 int num_pending_watches_; |
491 int num_pending_timeouts_; | 491 int num_pending_timeouts_; |
492 | 492 |
493 DISALLOW_COPY_AND_ASSIGN(Bus); | 493 DISALLOW_COPY_AND_ASSIGN(Bus); |
494 }; | 494 }; |
495 | 495 |
496 } // namespace dbus | 496 } // namespace dbus |
497 | 497 |
498 #endif // DBUS_BUS_H_ | 498 #endif // DBUS_BUS_H_ |
OLD | NEW |