OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_POWER_OBSERVER_H_ | 5 #ifndef CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_POWER_OBSERVER_H_ |
6 #define CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_POWER_OBSERVER_H_ | 6 #define CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_POWER_OBSERVER_H_ |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/macros.h" |
9 #include "base/power_monitor/power_observer.h" | 10 #include "base/power_monitor/power_observer.h" |
10 #include "content/browser/background_sync/background_sync.pb.h" | 11 #include "content/browser/background_sync/background_sync.pb.h" |
11 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
12 | 13 |
13 namespace content { | 14 namespace content { |
14 | 15 |
15 // BackgroundSyncPowerObserver monitors the charging status of the device and | 16 // BackgroundSyncPowerObserver monitors the charging status of the device and |
16 // determines if the power conditions of BackgroundSyncRegistrations are met. | 17 // determines if the power conditions of BackgroundSyncRegistrations are met. |
17 class CONTENT_EXPORT BackgroundSyncPowerObserver : public base::PowerObserver { | 18 class CONTENT_EXPORT BackgroundSyncPowerObserver : public base::PowerObserver { |
18 public: | 19 public: |
(...skipping 22 matching lines...) Expand all Loading... |
41 | 42 |
42 // The callback to run when the battery state changes. | 43 // The callback to run when the battery state changes. |
43 base::Closure power_changed_callback_; | 44 base::Closure power_changed_callback_; |
44 | 45 |
45 DISALLOW_COPY_AND_ASSIGN(BackgroundSyncPowerObserver); | 46 DISALLOW_COPY_AND_ASSIGN(BackgroundSyncPowerObserver); |
46 }; | 47 }; |
47 | 48 |
48 } // namespace content | 49 } // namespace content |
49 | 50 |
50 #endif // CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_POWER_OBSERVER_H_ | 51 #endif // CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_POWER_OBSERVER_H_ |
OLD | NEW |