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

Side by Side Diff: webkit/tools/test_shell/test_shell.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: correct review items 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 #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 29 matching lines...) Expand all
40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" 40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h"
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"
51 #include "webkit/plugins/webplugininfo.h"
52 #include "webkit/tools/test_shell/notification_presenter.h" 50 #include "webkit/tools/test_shell/notification_presenter.h"
53 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" 51 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h"
54 #include "webkit/tools/test_shell/test_navigation_controller.h" 52 #include "webkit/tools/test_shell/test_navigation_controller.h"
55 #include "webkit/tools/test_shell/test_shell_devtools_agent.h" 53 #include "webkit/tools/test_shell/test_shell_devtools_agent.h"
56 #include "webkit/tools/test_shell/test_shell_devtools_client.h" 54 #include "webkit/tools/test_shell/test_shell_devtools_client.h"
57 #include "webkit/tools/test_shell/test_shell_request_context.h" 55 #include "webkit/tools/test_shell/test_shell_request_context.h"
58 #include "webkit/tools/test_shell/test_shell_switches.h" 56 #include "webkit/tools/test_shell/test_shell_switches.h"
59 #include "webkit/tools/test_shell/test_webview_delegate.h" 57 #include "webkit/tools/test_shell/test_webview_delegate.h"
60 58
61 using WebKit::WebCanvas; 59 using WebKit::WebCanvas;
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 631
634 bool IsProtocolSupportedForMedia(const GURL& url) { 632 bool IsProtocolSupportedForMedia(const GURL& url) {
635 if (url.SchemeIsFile() || 633 if (url.SchemeIsFile() ||
636 url.SchemeIs("http") || 634 url.SchemeIs("http") ||
637 url.SchemeIs("https") || 635 url.SchemeIs("https") ||
638 url.SchemeIs("data")) 636 url.SchemeIs("data"))
639 return true; 637 return true;
640 return false; 638 return false;
641 } 639 }
642 640
643 void GetPlugins(bool refresh,
644 std::vector<webkit::WebPluginInfo>* plugins) {
645 if (refresh)
646 webkit::npapi::PluginList::Singleton()->RefreshPlugins();
647 webkit::npapi::PluginList::Singleton()->GetPlugins(plugins);
648 // Don't load the forked TestNetscapePlugIn in the chromium code, use
649 // the copy in webkit.org's repository instead.
650 const FilePath::StringType kPluginBlackList[] = {
651 FILE_PATH_LITERAL("npapi_layout_test_plugin.dll"),
652 FILE_PATH_LITERAL("WebKitTestNetscapePlugIn.plugin"),
653 FILE_PATH_LITERAL("libnpapi_layout_test_plugin.so"),
654 };
655 for (int i = plugins->size() - 1; i >= 0; --i) {
656 webkit::WebPluginInfo plugin_info = plugins->at(i);
657 for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) {
658 if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) {
659 plugins->erase(plugins->begin() + i);
660 }
661 }
662 }
663 }
664
665 } // namespace webkit_glue 641 } // namespace webkit_glue
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698