OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CC_BASE_DELAYED_UNIQUE_NOTIFIER_H_ | 5 #ifndef CC_BASE_DELAYED_UNIQUE_NOTIFIER_H_ |
6 #define CC_BASE_DELAYED_UNIQUE_NOTIFIER_H_ | 6 #define CC_BASE_DELAYED_UNIQUE_NOTIFIER_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
11 #include "cc/base/cc_export.h" | 11 #include "cc/base/base_export.h" |
12 | 12 |
13 namespace base { | 13 namespace base { |
14 class SequencedTaskRunner; | 14 class SequencedTaskRunner; |
15 } // namespace base | 15 } // namespace base |
16 | 16 |
17 namespace cc { | 17 namespace cc { |
18 | 18 |
19 class CC_EXPORT DelayedUniqueNotifier { | 19 class CC_BASE_EXPORT DelayedUniqueNotifier { |
20 public: | 20 public: |
21 // Configure this notifier to issue the |closure| notification in |delay| time | 21 // Configure this notifier to issue the |closure| notification in |delay| time |
22 // from Schedule() call. | 22 // from Schedule() call. |
23 DelayedUniqueNotifier(base::SequencedTaskRunner* task_runner, | 23 DelayedUniqueNotifier(base::SequencedTaskRunner* task_runner, |
24 const base::Closure& closure, | 24 const base::Closure& closure, |
25 const base::TimeDelta& delay); | 25 const base::TimeDelta& delay); |
26 | 26 |
27 // Destroying the notifier will ensure that no further notifications will | 27 // Destroying the notifier will ensure that no further notifications will |
28 // happen from this class. | 28 // happen from this class. |
29 virtual ~DelayedUniqueNotifier(); | 29 virtual ~DelayedUniqueNotifier(); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 bool notification_pending_; | 66 bool notification_pending_; |
67 | 67 |
68 base::WeakPtrFactory<DelayedUniqueNotifier> weak_ptr_factory_; | 68 base::WeakPtrFactory<DelayedUniqueNotifier> weak_ptr_factory_; |
69 | 69 |
70 DISALLOW_COPY_AND_ASSIGN(DelayedUniqueNotifier); | 70 DISALLOW_COPY_AND_ASSIGN(DelayedUniqueNotifier); |
71 }; | 71 }; |
72 | 72 |
73 } // namespace cc | 73 } // namespace cc |
74 | 74 |
75 #endif // CC_BASE_DELAYED_UNIQUE_NOTIFIER_H_ | 75 #endif // CC_BASE_DELAYED_UNIQUE_NOTIFIER_H_ |
OLD | NEW |