Index: chrome/browser/wake_lock/chrome_wake_lock_permission_context.h |
diff --git a/chrome/browser/wake_lock/chrome_wake_lock_permission_context.h b/chrome/browser/wake_lock/chrome_wake_lock_permission_context.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..79bfb5128eef90c2243e200c119ba1c374946726 |
--- /dev/null |
+++ b/chrome/browser/wake_lock/chrome_wake_lock_permission_context.h |
@@ -0,0 +1,43 @@ |
+// 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 CHROME_BROWSER_WAKE_LOCK_CHROME_WAKE_LOCK_PERMISSION_CONTEXT_H_ |
+#define CHROME_BROWSER_WAKE_LOCK_CHROME_WAKE_LOCK_PERMISSION_CONTEXT_H_ |
+ |
+#include "content/public/browser/wake_lock_permission_context.h" |
+ |
+namespace content { |
+class WebContents; |
+} |
+ |
+class PermissionRequestID; |
+class Profile; |
+ |
+class ChromeWakeLockPermissionContext |
+ : public content::WakeLockPermissionContext { |
+ public: |
+ explicit ChromeWakeLockPermissionContext(Profile* profile); |
+ |
+ // WakeLockPermissionContext: |
+ virtual void RequestWakeLockPermission( |
+ int render_process_id, |
+ int render_view_id, |
+ const GURL& requesting_frame, |
+ WakeLockCallback callback) OVERRIDE; |
+ |
+ void ShutdownOnUIThread(); |
+ |
+ protected: |
+ virtual ~ChromeWakeLockPermissionContext(); |
+ |
+ Profile* profile() const { return profile_; } |
+ |
+ private: |
+ Profile* const profile_; |
+ bool shutting_down_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ChromeWakeLockPermissionContext); |
+}; |
+ |
+#endif // CHROME_BROWSER_WAKE_LOCK_CHROME_WAKE_LOCK_PERMISSION_CONTEXT_H_ |