| 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 CONTENT_BROWSER_WAKE_LOCK_WAKE_LOCK_CONTEXT_HOST_H_ | 5 #ifndef CONTENT_BROWSER_WAKE_LOCK_WAKE_LOCK_CONTEXT_HOST_H_ |
| 6 #define CONTENT_BROWSER_WAKE_LOCK_WAKE_LOCK_CONTEXT_HOST_H_ | 6 #define CONTENT_BROWSER_WAKE_LOCK_WAKE_LOCK_CONTEXT_HOST_H_ |
| 7 | 7 |
| 8 #include "content/public/browser/web_contents.h" | 8 #include "content/public/browser/web_contents.h" |
| 9 #include "device/wake_lock/public/interfaces/wake_lock_context.mojom.h" | 9 #include "device/wake_lock/public/interfaces/wake_lock_context.mojom.h" |
| 10 #include "device/wake_lock/public/interfaces/wake_lock_context_provider.mojom.h" | 10 #include "device/wake_lock/public/interfaces/wake_lock_provider.mojom.h" |
| 11 #include "ui/gfx/native_widget_types.h" | 11 #include "ui/gfx/native_widget_types.h" |
| 12 | 12 |
| 13 namespace content { | 13 namespace content { |
| 14 | 14 |
| 15 // On Android, WakeLockContext requires the NativeView associated with the | 15 // On Android, WakeLockContext requires the NativeView associated with the |
| 16 // context in order to lock the screen. WakeLockContextHost provides this | 16 // context in order to lock the screen. WakeLockContextHost provides this |
| 17 // functionality by mapping WakeLockContext IDs to the WebContents associated | 17 // functionality by mapping WakeLockContext IDs to the WebContents associated |
| 18 // with those IDs. | 18 // with those IDs. |
| 19 class WakeLockContextHost { | 19 class WakeLockContextHost { |
| 20 public: | 20 public: |
| (...skipping 18 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 // The WakeLockContext instance that is connected to this instance. | 40 // The WakeLockContext instance that is connected to this instance. |
| 41 device::mojom::WakeLockContextPtr wake_lock_context_; | 41 device::mojom::WakeLockContextPtr wake_lock_context_; |
| 42 | 42 |
| 43 DISALLOW_COPY_AND_ASSIGN(WakeLockContextHost); | 43 DISALLOW_COPY_AND_ASSIGN(WakeLockContextHost); |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 } // namespace content | 46 } // namespace content |
| 47 | 47 |
| 48 #endif // CONTENT_BROWSER_WAKE_LOCK_WAKE_LOCK_CONTEXT_HOST_H_ | 48 #endif // CONTENT_BROWSER_WAKE_LOCK_WAKE_LOCK_CONTEXT_HOST_H_ |
| OLD | NEW |