Index: webkit/plugins/npapi/plugin_list_win.cc |
=================================================================== |
--- webkit/plugins/npapi/plugin_list_win.cc (revision 0) |
+++ webkit/plugins/npapi/plugin_list_win.cc (working copy) |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "webkit/glue/plugins/plugin_list.h" |
+#include "webkit/plugins/npapi/plugin_list.h" |
#include <tchar.h> |
@@ -17,29 +17,33 @@ |
#include "base/string_split.h" |
#include "base/string_util.h" |
#include "base/win/registry.h" |
-#include "webkit/glue/plugins/plugin_constants_win.h" |
-#include "webkit/glue/plugins/plugin_lib.h" |
+#include "webkit/plugins/npapi/plugin_constants_win.h" |
+#include "webkit/plugins/npapi/plugin_lib.h" |
+#include "webkit/plugins/plugin_switches.h" |
#include "webkit/glue/webkit_glue.h" |
+namespace webkit { |
+namespace npapi { |
+ |
namespace { |
-const TCHAR kRegistryApps[] = |
- _T("Software\\Microsoft\\Windows\\CurrentVersion\\App Paths"); |
-const TCHAR kRegistryFirefox[] = _T("firefox.exe"); |
-const TCHAR kRegistryAcrobat[] = _T("Acrobat.exe"); |
-const TCHAR kRegistryAcrobatReader[] = _T("AcroRd32.exe"); |
-const TCHAR kRegistryWindowsMedia[] = _T("wmplayer.exe"); |
-const TCHAR kRegistryQuickTime[] = _T("QuickTimePlayer.exe"); |
-const TCHAR kRegistryPath[] = _T("Path"); |
-const TCHAR kRegistryFirefoxInstalled[] = |
- _T("SOFTWARE\\Mozilla\\Mozilla Firefox"); |
-const TCHAR kRegistryJava[] = |
- _T("Software\\JavaSoft\\Java Runtime Environment"); |
-const TCHAR kRegistryBrowserJavaVersion[] = _T("BrowserJavaVersion"); |
-const TCHAR kRegistryCurrentJavaVersion[] = _T("CurrentVersion"); |
-const TCHAR kRegistryJavaHome[] = _T("JavaHome"); |
-const TCHAR kJavaDeploy1[] = _T("npdeploytk.dll"); |
-const TCHAR kJavaDeploy2[] = _T("npdeployjava1.dll"); |
+const char16 kRegistryApps[] = |
+ L"Software\\Microsoft\\Windows\\CurrentVersion\\App Paths"; |
+const char16 kRegistryFirefox[] = L"firefox.exe"; |
+const char16 kRegistryAcrobat[] = L"Acrobat.exe"; |
+const char16 kRegistryAcrobatReader[] = L"AcroRd32.exe"; |
+const char16 kRegistryWindowsMedia[] = L"wmplayer.exe"; |
+const char16 kRegistryQuickTime[] = L"QuickTimePlayer.exe"; |
+const char16 kRegistryPath[] = L"Path"; |
+const char16 kRegistryFirefoxInstalled[] = |
+ L"SOFTWARE\\Mozilla\\Mozilla Firefox"; |
+const char16 kRegistryJava[] = |
+ L"Software\\JavaSoft\\Java Runtime Environment"; |
+const char16 kRegistryBrowserJavaVersion[] = L"BrowserJavaVersion"; |
+const char16 kRegistryCurrentJavaVersion[] = L"CurrentVersion"; |
+const char16 kRegistryJavaHome[] = L"JavaHome"; |
+const char16 kJavaDeploy1[] = L"npdeploytk.dll"; |
+const char16 kJavaDeploy2[] = L"npdeployjava1.dll"; |
// The application path where we expect to find plugins. |
void GetAppDirectory(std::set<FilePath>* plugin_dirs) { |
@@ -62,7 +66,7 @@ |
} |
// Gets the installed path for a registered app. |
-bool GetInstalledPath(const TCHAR* app, FilePath* out) { |
+bool GetInstalledPath(const char16* app, FilePath* out) { |
std::wstring reg_path(kRegistryApps); |
reg_path.append(L"\\"); |
reg_path.append(app); |
@@ -210,11 +214,9 @@ |
} // anonymous namespace |
-namespace NPAPI { |
- |
void PluginList::PlatformInit() { |
const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
- dont_load_new_wmp_ = command_line.HasSwitch(kUseOldWMPPluginSwitch); |
+ dont_load_new_wmp_ = command_line.HasSwitch(switches::kUseOldWMPPlugin); |
} |
void PluginList::GetPluginDirectories(std::vector<FilePath>* plugin_dirs) { |
@@ -407,4 +409,5 @@ |
return true; |
} |
-} // namespace NPAPI |
+} // namespace npapi |
+} // namespace webkit |