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

Side by Side Diff: webkit/support/webkit_support_glue.cc

Issue 8602002: Move some webkit_glue embedder functions into WebKitPlatformSupport virtual methods (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright year Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "webkit/glue/webkit_glue.h" 5 #include "webkit/glue/webkit_glue.h"
6 6
7 #include "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "webkit/glue/user_agent.h" 9 #include "webkit/glue/user_agent.h"
10 #include "webkit/plugins/npapi/plugin_list.h"
11 10
12 // Functions needed by webkit_glue. 11 // Functions needed by webkit_glue.
13 12
14 namespace webkit_glue { 13 namespace webkit_glue {
15 14
16 void GetPlugins(bool refresh,
17 std::vector<webkit::WebPluginInfo>* plugins) {
18 if (refresh)
19 webkit::npapi::PluginList::Singleton()->RefreshPlugins();
20 webkit::npapi::PluginList::Singleton()->GetPlugins(plugins);
21 // Don't load the forked npapi_layout_test_plugin in DRT, we only want to
22 // use the upstream version TestNetscapePlugIn.
23 const FilePath::StringType kPluginBlackList[] = {
24 FILE_PATH_LITERAL("npapi_layout_test_plugin.dll"),
25 FILE_PATH_LITERAL("WebKitTestNetscapePlugIn.plugin"),
26 FILE_PATH_LITERAL("libnpapi_layout_test_plugin.so"),
27 };
28 for (int i = plugins->size() - 1; i >= 0; --i) {
29 webkit::WebPluginInfo plugin_info = plugins->at(i);
30 for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) {
31 if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) {
32 plugins->erase(plugins->begin() + i);
33 }
34 }
35 }
36 }
37
38 void AppendToLog(const char*, int, const char*) { 15 void AppendToLog(const char*, int, const char*) {
39 } 16 }
40 17
41 bool GetPluginFinderURL(std::string* plugin_finder_url) { 18 bool GetPluginFinderURL(std::string* plugin_finder_url) {
42 return false; 19 return false;
43 } 20 }
44 21
45 #if defined(OS_WIN) 22 #if defined(OS_WIN)
46 bool DownloadUrl(const std::string& url, HWND caller_window) { 23 bool DownloadUrl(const std::string& url, HWND caller_window) {
47 return false; 24 return false;
48 } 25 }
49 #endif 26 #endif
50 27
51 void EnableSpdy(bool enable) { 28 void EnableSpdy(bool enable) {
52 } 29 }
53 30
54 void UserMetricsRecordAction(const std::string& action) { 31 void UserMetricsRecordAction(const std::string& action) {
55 } 32 }
56 33
57 } // namespace webkit_glue 34 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/support/test_webkit_platform_support.cc ('k') | webkit/tools/test_shell/simple_resource_loader_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698