Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: webkit/glue/plugins/plugin_list_win.cc

Issue 5998002: Revert "Move the NPAPI files from webkit/glue/plugins to webkit/plugins/npapi" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/plugins/plugin_list_posix.cc ('k') | webkit/glue/plugins/plugin_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/plugin_list_win.cc
diff --git a/webkit/plugins/npapi/plugin_list_win.cc b/webkit/glue/plugins/plugin_list_win.cc
similarity index 91%
rename from webkit/plugins/npapi/plugin_list_win.cc
rename to webkit/glue/plugins/plugin_list_win.cc
index d7f13ef954c225f01e6cadd812e0fb24ff187214..486926251b8cb48774389c3a4d9e8824307a2c25 100644
--- a/webkit/plugins/npapi/plugin_list_win.cc
+++ b/webkit/glue/plugins/plugin_list_win.cc
@@ -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/plugins/npapi/plugin_list.h"
+#include "webkit/glue/plugins/plugin_list.h"
#include <tchar.h>
@@ -17,33 +17,29 @@
#include "base/string_split.h"
#include "base/string_util.h"
#include "base/win/registry.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/plugins/plugin_constants_win.h"
+#include "webkit/glue/plugins/plugin_lib.h"
#include "webkit/glue/webkit_glue.h"
-namespace webkit {
-namespace npapi {
-
namespace {
-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";
+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");
// The application path where we expect to find plugins.
void GetAppDirectory(std::set<FilePath>* plugin_dirs) {
@@ -66,7 +62,7 @@ void GetExeDirectory(std::set<FilePath>* plugin_dirs) {
}
// Gets the installed path for a registered app.
-bool GetInstalledPath(const char16* app, FilePath* out) {
+bool GetInstalledPath(const TCHAR* app, FilePath* out) {
std::wstring reg_path(kRegistryApps);
reg_path.append(L"\\");
reg_path.append(app);
@@ -214,9 +210,11 @@ void GetJavaDirectory(std::set<FilePath>* plugin_dirs) {
} // anonymous namespace
+namespace NPAPI {
+
void PluginList::PlatformInit() {
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
- dont_load_new_wmp_ = command_line.HasSwitch(switches::kUseOldWMPPlugin);
+ dont_load_new_wmp_ = command_line.HasSwitch(kUseOldWMPPluginSwitch);
}
void PluginList::GetPluginDirectories(std::vector<FilePath>* plugin_dirs) {
@@ -409,5 +407,4 @@ bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info,
return true;
}
-} // namespace npapi
-} // namespace webkit
+} // namespace NPAPI
« no previous file with comments | « webkit/glue/plugins/plugin_list_posix.cc ('k') | webkit/glue/plugins/plugin_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698