| Index: chrome/browser/wake_lock/wake_lock_preference.h
|
| diff --git a/chrome/browser/wake_lock/wake_lock_preference.h b/chrome/browser/wake_lock/wake_lock_preference.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..88275a5b2a8fb2e81ce1b50c7d623ed67772b633
|
| --- /dev/null
|
| +++ b/chrome/browser/wake_lock/wake_lock_preference.h
|
| @@ -0,0 +1,39 @@
|
| +// 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_WAKE_LOCK_PREFERENCE_H_
|
| +#define CHROME_BROWSER_WAKE_LOCK_WAKE_LOCK_PREFERENCE_H_
|
| +
|
| +#include <string>
|
| +#include "base/memory/scoped_ptr.h"
|
| +
|
| +class PrefService;
|
| +
|
| +namespace user_prefs {
|
| +class PrefRegistrySyncable;
|
| +}
|
| +
|
| +class WakeLockPreference {
|
| + public:
|
| + static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
|
| + static scoped_ptr<WakeLockPreference> createWakeLockPreference(
|
| + int render_process_id, int routed_id);
|
| +
|
| + bool isSavedAllow(const std::string& key);
|
| + bool isAllowed(const std::string& key);
|
| + void setAllowed(const std::string& key, bool allowed);
|
| + private:
|
| + enum WakeLockPreferenceStatus {
|
| + WakeLockPreferenceNotFound = 0,
|
| + WakeLockPreferenceYes,
|
| + WakeLockPreferenceNo
|
| + };
|
| +
|
| + WakeLockPreference(int render_process_id, int routed_id);
|
| + WakeLockPreferenceStatus getAllowed(const std::string& key);
|
| +
|
| + PrefService* pref_service_;
|
| +};
|
| +
|
| +#endif // CHROME_BROWSER_WAKE_LOCK_WAKE_LOCK_PREFERENCE_H_
|
|
|