Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Unified Diff: device/wake_lock/wake_lock_provider.h

Issue 2874013002: Add GetWakeLockWithoutContext() in WakeLockContextProvider mojo interface. (Closed)
Patch Set: Add GetWakeLockWithoutContext in WakeLockContextProvider mojo interface. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/wake_lock/wake_lock_context_provider.cc ('k') | device/wake_lock/wake_lock_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/wake_lock/wake_lock_provider.h
diff --git a/device/wake_lock/wake_lock_context_provider.h b/device/wake_lock/wake_lock_provider.h
similarity index 54%
rename from device/wake_lock/wake_lock_context_provider.h
rename to device/wake_lock/wake_lock_provider.h
index 36c8c759a4f9b922785794f36cfafa7ef8b4d4c5..623af878fadccad8aa91723a46926f835f9b4628 100644
--- a/device/wake_lock/wake_lock_context_provider.h
+++ b/device/wake_lock/wake_lock_provider.h
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef DEVICE_WAKE_LOCK_WAKE_LOCK_CONTEXT_PROVIDER_H_
-#define DEVICE_WAKE_LOCK_WAKE_LOCK_CONTEXT_PROVIDER_H_
+#ifndef DEVICE_WAKE_LOCK_WAKE_LOCK_PROVIDER_H_
+#define DEVICE_WAKE_LOCK_WAKE_LOCK_PROVIDER_H_
#include "base/sequenced_task_runner.h"
#include "device/wake_lock/public/interfaces/wake_lock_context.mojom.h"
-#include "device/wake_lock/public/interfaces/wake_lock_context_provider.mojom.h"
+#include "device/wake_lock/public/interfaces/wake_lock_provider.mojom.h"
#include "device/wake_lock/wake_lock_service_context.h"
#include "mojo/public/cpp/bindings/interface_request.h"
#include "ui/gfx/native_widget_types.h"
@@ -15,30 +15,35 @@
namespace device {
// Serves requests for WakeLockContext connections.
-class WakeLockContextProvider : public mojom::WakeLockContextProvider {
+class WakeLockProvider : public mojom::WakeLockProvider {
public:
- WakeLockContextProvider(
- scoped_refptr<base::SingleThreadTaskRunner> file_task_runner,
- const WakeLockContextCallback& native_view_getter);
- ~WakeLockContextProvider() override;
+ WakeLockProvider(scoped_refptr<base::SingleThreadTaskRunner> file_task_runner,
+ const WakeLockContextCallback& native_view_getter);
+ ~WakeLockProvider() override;
static void Create(
- mojom::WakeLockContextProviderRequest request,
+ mojom::WakeLockProviderRequest request,
scoped_refptr<base::SingleThreadTaskRunner> file_task_runner,
const WakeLockContextCallback& native_view_getter);
- // mojom::WakeLockContextProvider:
+ // mojom::WakeLockProvider:
void GetWakeLockContextForID(
int context_id,
mojo::InterfaceRequest<mojom::WakeLockContext> request) override;
+ void GetWakeLockWithoutContext(
+ mojom::WakeLockType type,
+ mojom::WakeLockReason reason,
+ const std::string& description,
+ mojom::WakeLockServiceRequest request) override;
+
private:
scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_;
WakeLockContextCallback native_view_getter_;
- DISALLOW_COPY_AND_ASSIGN(WakeLockContextProvider);
+ DISALLOW_COPY_AND_ASSIGN(WakeLockProvider);
};
} // namespace device
-#endif // DEVICE_WAKE_LOCK_WAKE_LOCK_CONTEXT_PROVIDER_H_
+#endif // DEVICE_WAKE_LOCK_WAKE_LOCK_PROVIDER_H_
« no previous file with comments | « device/wake_lock/wake_lock_context_provider.cc ('k') | device/wake_lock/wake_lock_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698