| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/extensions/api/system_private/system_private_api.h" | 5 #include "chrome/browser/extensions/api/system_private/system_private_api.h" |
| 6 | 6 |
| 7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/extensions/event_router_forwarder.h" | 10 #include "chrome/browser/extensions/event_router_forwarder.h" |
| 11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 12 #include "chrome/common/extensions/api/system_private.h" | 12 #include "chrome/common/extensions/api/system_private.h" |
| 13 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
| 14 #include "google_apis/google_api_keys.h" | 14 #include "google_apis/google_api_keys.h" |
| 15 | 15 |
| 16 #if defined(OS_CHROMEOS) | 16 #if defined(OS_CHROMEOS) |
| 17 #include "chromeos/dbus/dbus_thread_manager.h" | 17 #include "chromeos/dbus/dbus_thread_manager.h" |
| 18 #include "chromeos/dbus/update_engine_client.h" | 18 #include "chromeos/dbus/update_engine_client.h" |
| 19 #else | 19 #else |
| 20 #include "chrome/browser/upgrade_detector.h" | 20 #include "chrome/browser/upgrade_detector.h" |
| 21 #endif | 21 #endif |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 // Maps prefs::kIncognitoModeAvailability values (0 = enabled, ...) | 25 // Maps prefs::kIncognitoModeAvailability values (0 = enabled, ...) |
| 26 // to strings exposed to extensions. | 26 // to strings exposed to extensions. |
| 27 const char* kIncognitoModeAvailabilityStrings[] = { | 27 const char* const kIncognitoModeAvailabilityStrings[] = { |
| 28 "enabled", | 28 "enabled", |
| 29 "disabled", | 29 "disabled", |
| 30 "forced" | 30 "forced" |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 // Property keys. | 33 // Property keys. |
| 34 const char kBrightnessKey[] = "brightness"; | 34 const char kBrightnessKey[] = "brightness"; |
| 35 const char kDownloadProgressKey[] = "downloadProgress"; | 35 const char kDownloadProgressKey[] = "downloadProgress"; |
| 36 const char kIsVolumeMutedKey[] = "isVolumeMuted"; | 36 const char kIsVolumeMutedKey[] = "isVolumeMuted"; |
| 37 const char kStateKey[] = "state"; | 37 const char kStateKey[] = "state"; |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 | 155 |
| 156 void DispatchScreenUnlockedEvent() { | 156 void DispatchScreenUnlockedEvent() { |
| 157 DispatchEvent(system_private::OnScreenUnlocked::kEventName, NULL); | 157 DispatchEvent(system_private::OnScreenUnlocked::kEventName, NULL); |
| 158 } | 158 } |
| 159 | 159 |
| 160 void DispatchWokeUpEvent() { | 160 void DispatchWokeUpEvent() { |
| 161 DispatchEvent(system_private::OnWokeUp::kEventName, NULL); | 161 DispatchEvent(system_private::OnWokeUp::kEventName, NULL); |
| 162 } | 162 } |
| 163 | 163 |
| 164 } // namespace extensions | 164 } // namespace extensions |
| OLD | NEW |