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

Unified Diff: device/wake_lock/wake_lock_service_context.h

Issue 2921823002: Rationalize WakeLock naming conventions (Closed)
Patch Set: rebase Created 3 years, 6 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_provider.cc ('k') | device/wake_lock/wake_lock_service_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/wake_lock/wake_lock_service_context.h
diff --git a/device/wake_lock/wake_lock_service_context.h b/device/wake_lock/wake_lock_service_context.h
deleted file mode 100644
index 59253de5cccf3405f64686a72ace9c1b47b97221..0000000000000000000000000000000000000000
--- a/device/wake_lock/wake_lock_service_context.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// 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_SERVICE_CONTEXT_H_
-#define DEVICE_WAKE_LOCK_WAKE_LOCK_SERVICE_CONTEXT_H_
-
-#include <memory>
-#include <utility>
-
-#include "base/callback.h"
-#include "base/memory/ref_counted.h"
-#include "base/single_thread_task_runner.h"
-#include "device/wake_lock/public/interfaces/wake_lock_context.mojom.h"
-#include "ui/gfx/native_widget_types.h"
-
-namespace device {
-
-// Callback that maps a context ID to the NativeView associated with
-// that context. This callback is provided to the Device Service by its
-// embedder.
-using WakeLockContextCallback = base::Callback<gfx::NativeView(int)>;
-
-// Serves requests for WakeLockService connections within a given context.
-class WakeLockServiceContext : public mojom::WakeLockContext {
- public:
- WakeLockServiceContext(
- int context_id,
- scoped_refptr<base::SingleThreadTaskRunner> file_task_runner,
- const WakeLockContextCallback& native_view_getter);
- ~WakeLockServiceContext() override;
-
- // mojom::WakeLockContext:
- void GetWakeLock(mojom::WakeLockType type,
- mojom::WakeLockReason reason,
- const std::string& description,
- mojom::WakeLockServiceRequest request) override;
-
- static const int WakeLockInvalidContextId;
-
- private:
- scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_;
- int context_id_;
- WakeLockContextCallback native_view_getter_;
-
- DISALLOW_COPY_AND_ASSIGN(WakeLockServiceContext);
-};
-
-} // namespace device
-
-#endif // DEVICE_WAKE_LOCK_WAKE_LOCK_SERVICE_CONTEXT_H_
« no previous file with comments | « device/wake_lock/wake_lock_provider.cc ('k') | device/wake_lock/wake_lock_service_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698