Index: chrome/common/pepper_flash.cc |
diff --git a/chrome/common/pepper_flash.cc b/chrome/common/pepper_flash.cc |
index 3b6cbd998c03ca1b5e4906cfe758352af96a0352..d7a5ac45ef5f11d9181e1a414027ba479eab89c4 100644 |
--- a/chrome/common/pepper_flash.cc |
+++ b/chrome/common/pepper_flash.cc |
@@ -2,17 +2,22 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+#include "chrome/common/pepper_flash.h" |
+ |
#include <stddef.h> |
#include "base/strings/string_split.h" |
#include "base/values.h" |
#include "base/version.h" |
#include "build/build_config.h" |
-#include "chrome/common/pepper_flash.h" |
#include "chrome/common/ppapi_utils.h" |
#include "ppapi/c/private/ppb_pdf.h" |
#include "ppapi/shared_impl/ppapi_permissions.h" |
+#if defined(OS_WIN) |
+#include "base/win/registry.h" |
+#endif |
+ |
namespace chrome { |
const int32_t kPepperFlashPermissions = |
@@ -128,4 +133,22 @@ bool CheckPepperFlashManifest(const base::DictionaryValue& manifest, |
return true; |
} |
+bool IsSystemFlashScriptDebuggerPresent() { |
+#if defined(OS_WIN) |
+ const wchar_t kFlashRegistryRoot[] = |
+ L"SOFTWARE\\Macromedia\\FlashPlayerPepper"; |
+ const wchar_t kIsDebuggerValueName[] = L"isScriptDebugger"; |
+ |
+ base::win::RegKey path_key(HKEY_LOCAL_MACHINE, kFlashRegistryRoot, KEY_READ); |
+ DWORD debug_value; |
+ if (path_key.ReadValueDW(kIsDebuggerValueName, &debug_value) != ERROR_SUCCESS) |
+ return false; |
+ |
+ return (debug_value == 1); |
+#else |
+ // TODO(wfh): implement this on OS X and Linux. crbug.com/497996. |
+ return false; |
+#endif |
+} |
+ |
} // namespace chrome |