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

Unified Diff: content/public/browser/wake_lock_permission_context.h

Issue 406483004: Initial implementation of API WakeLock. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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
Index: content/public/browser/wake_lock_permission_context.h
diff --git a/content/public/browser/wake_lock_permission_context.h b/content/public/browser/wake_lock_permission_context.h
new file mode 100644
index 0000000000000000000000000000000000000000..8b59a4684411785cd8ef1e1b72157295f9c803b7
--- /dev/null
+++ b/content/public/browser/wake_lock_permission_context.h
@@ -0,0 +1,34 @@
+// Copyright (c) 2014 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 CONTENT_PUBLIC_BROWSER_WAKE_LOCK_PERMISSION_CONTEXT_H_
+#define CONTENT_PUBLIC_BROWSER_WAKE_LOCK_PERMISSION_CONTEXT_H_
+
+#include "base/callback.h"
+#include "base/memory/ref_counted.h"
+#include "content/common/content_export.h"
+
+class GURL;
+
+namespace content {
+
+class CONTENT_EXPORT WakeLockPermissionContext
+ : public base::RefCountedThreadSafe<WakeLockPermissionContext> {
+ public:
+ typedef base::Callback<void(bool allowed)> WakeLockCallback;
+ virtual void RequestWakeLockPermission(
+ int render_process_id,
+ int render_view_id,
+ const GURL& requesting_frame,
+ WakeLockCallback callback) = 0;
+
+ protected:
+ virtual ~WakeLockPermissionContext() { }
+
+ private:
+ friend class base::RefCountedThreadSafe<WakeLockPermissionContext>;
+};
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_WAKE_LOCK_PERMISSION_CONTEXT_H_

Powered by Google App Engine
This is Rietveld 408576698