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

Side by Side Diff: webkit/tools/test_shell/test_shell.cc

Issue 7648017: Make WebPluginInfo more generic (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months 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
« no previous file with comments | « webkit/support/webkit_support_glue.cc ('k') | webkit/tools/test_shell/test_webview_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #undef LOG 5 #undef LOG
6 6
7 #include "webkit/tools/test_shell/test_shell.h" 7 #include "webkit/tools/test_shell/test_shell.h"
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 30 matching lines...) Expand all
41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" 41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h"
42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h" 42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h"
43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
44 #include "ui/gfx/codec/png_codec.h" 44 #include "ui/gfx/codec/png_codec.h"
45 #include "ui/gfx/size.h" 45 #include "ui/gfx/size.h"
46 #include "webkit/glue/glue_serialize.h" 46 #include "webkit/glue/glue_serialize.h"
47 #include "webkit/glue/user_agent.h" 47 #include "webkit/glue/user_agent.h"
48 #include "webkit/glue/webkit_glue.h" 48 #include "webkit/glue/webkit_glue.h"
49 #include "webkit/glue/webpreferences.h" 49 #include "webkit/glue/webpreferences.h"
50 #include "webkit/plugins/npapi/plugin_list.h" 50 #include "webkit/plugins/npapi/plugin_list.h"
51 #include "webkit/plugins/npapi/webplugininfo.h" 51 #include "webkit/plugins/webplugininfo.h"
52 #include "webkit/tools/test_shell/notification_presenter.h" 52 #include "webkit/tools/test_shell/notification_presenter.h"
53 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" 53 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h"
54 #include "webkit/tools/test_shell/test_navigation_controller.h" 54 #include "webkit/tools/test_shell/test_navigation_controller.h"
55 #include "webkit/tools/test_shell/test_shell_devtools_agent.h" 55 #include "webkit/tools/test_shell/test_shell_devtools_agent.h"
56 #include "webkit/tools/test_shell/test_shell_devtools_client.h" 56 #include "webkit/tools/test_shell/test_shell_devtools_client.h"
57 #include "webkit/tools/test_shell/test_shell_request_context.h" 57 #include "webkit/tools/test_shell/test_shell_request_context.h"
58 #include "webkit/tools/test_shell/test_shell_switches.h" 58 #include "webkit/tools/test_shell/test_shell_switches.h"
59 #include "webkit/tools/test_shell/test_webview_delegate.h" 59 #include "webkit/tools/test_shell/test_webview_delegate.h"
60 60
61 using WebKit::WebCanvas; 61 using WebKit::WebCanvas;
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 return -1; 677 return -1;
678 } 678 }
679 679
680 bool GetFontTable(int fd, uint32_t table, uint8_t* output, 680 bool GetFontTable(int fd, uint32_t table, uint8_t* output,
681 size_t* output_length) { 681 size_t* output_length) {
682 return false; 682 return false;
683 } 683 }
684 #endif 684 #endif
685 685
686 void GetPlugins(bool refresh, 686 void GetPlugins(bool refresh,
687 std::vector<webkit::npapi::WebPluginInfo>* plugins) { 687 std::vector<webkit::WebPluginInfo>* plugins) {
688 if (refresh) 688 if (refresh)
689 webkit::npapi::PluginList::Singleton()->RefreshPlugins(); 689 webkit::npapi::PluginList::Singleton()->RefreshPlugins();
690 webkit::npapi::PluginList::Singleton()->GetPlugins(plugins); 690 webkit::npapi::PluginList::Singleton()->GetPlugins(plugins);
691 // Don't load the forked TestNetscapePlugIn in the chromium code, use 691 // Don't load the forked TestNetscapePlugIn in the chromium code, use
692 // the copy in webkit.org's repository instead. 692 // the copy in webkit.org's repository instead.
693 const FilePath::StringType kPluginBlackList[] = { 693 const FilePath::StringType kPluginBlackList[] = {
694 FILE_PATH_LITERAL("npapi_layout_test_plugin.dll"), 694 FILE_PATH_LITERAL("npapi_layout_test_plugin.dll"),
695 FILE_PATH_LITERAL("WebKitTestNetscapePlugIn.plugin"), 695 FILE_PATH_LITERAL("WebKitTestNetscapePlugIn.plugin"),
696 FILE_PATH_LITERAL("libnpapi_layout_test_plugin.so"), 696 FILE_PATH_LITERAL("libnpapi_layout_test_plugin.so"),
697 }; 697 };
698 for (int i = plugins->size() - 1; i >= 0; --i) { 698 for (int i = plugins->size() - 1; i >= 0; --i) {
699 webkit::npapi::WebPluginInfo plugin_info = plugins->at(i); 699 webkit::WebPluginInfo plugin_info = plugins->at(i);
700 for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) { 700 for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) {
701 if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) { 701 if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) {
702 webkit::npapi::PluginList::Singleton()->DisablePlugin(plugin_info.path); 702 webkit::npapi::PluginList::Singleton()->DisablePlugin(plugin_info.path);
703 plugins->erase(plugins->begin() + i); 703 plugins->erase(plugins->begin() + i);
704 } 704 }
705 } 705 }
706 } 706 }
707 } 707 }
708 708
709 } // namespace webkit_glue 709 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/support/webkit_support_glue.cc ('k') | webkit/tools/test_shell/test_webview_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698