OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 DEVICE_WAKE_LOCK_WAKE_LOCK_PROVIDER_H_ | 5 #ifndef DEVICE_WAKE_LOCK_WAKE_LOCK_PROVIDER_H_ |
6 #define DEVICE_WAKE_LOCK_WAKE_LOCK_PROVIDER_H_ | 6 #define DEVICE_WAKE_LOCK_WAKE_LOCK_PROVIDER_H_ |
7 | 7 |
8 #include "base/sequenced_task_runner.h" | 8 #include "base/sequenced_task_runner.h" |
| 9 #include "base/single_thread_task_runner.h" |
9 #include "device/wake_lock/public/interfaces/wake_lock_context.mojom.h" | 10 #include "device/wake_lock/public/interfaces/wake_lock_context.mojom.h" |
10 #include "device/wake_lock/public/interfaces/wake_lock_provider.mojom.h" | 11 #include "device/wake_lock/public/interfaces/wake_lock_provider.mojom.h" |
11 #include "device/wake_lock/wake_lock_service_context.h" | 12 #include "device/wake_lock/wake_lock_service_context.h" |
12 #include "mojo/public/cpp/bindings/interface_request.h" | 13 #include "mojo/public/cpp/bindings/interface_request.h" |
13 #include "ui/gfx/native_widget_types.h" | 14 #include "ui/gfx/native_widget_types.h" |
14 | 15 |
15 namespace device { | 16 namespace device { |
16 | 17 |
17 // Serves requests for WakeLockContext connections. | 18 // Serves requests for WakeLockContext connections. |
18 class WakeLockProvider : public mojom::WakeLockProvider { | 19 class WakeLockProvider : public mojom::WakeLockProvider { |
(...skipping 21 matching lines...) Expand all Loading... |
40 private: | 41 private: |
41 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; | 42 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; |
42 WakeLockContextCallback native_view_getter_; | 43 WakeLockContextCallback native_view_getter_; |
43 | 44 |
44 DISALLOW_COPY_AND_ASSIGN(WakeLockProvider); | 45 DISALLOW_COPY_AND_ASSIGN(WakeLockProvider); |
45 }; | 46 }; |
46 | 47 |
47 } // namespace device | 48 } // namespace device |
48 | 49 |
49 #endif // DEVICE_WAKE_LOCK_WAKE_LOCK_PROVIDER_H_ | 50 #endif // DEVICE_WAKE_LOCK_WAKE_LOCK_PROVIDER_H_ |
OLD | NEW |