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

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

Issue 8616008: Remove IsProtocolSupportedForMedia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 } 620 }
621 621
622 WebKit::WebGeolocationClientMock* TestShell::geolocation_client_mock() { 622 WebKit::WebGeolocationClientMock* TestShell::geolocation_client_mock() {
623 if (!geolocation_client_mock_.get()) { 623 if (!geolocation_client_mock_.get()) {
624 geolocation_client_mock_.reset( 624 geolocation_client_mock_.reset(
625 WebKit::WebGeolocationClientMock::create()); 625 WebKit::WebGeolocationClientMock::create());
626 } 626 }
627 return geolocation_client_mock_.get(); 627 return geolocation_client_mock_.get();
628 } 628 }
629 629
630 //-----------------------------------------------------------------------------
631
632 namespace webkit_glue { 630 namespace webkit_glue {
633 631
634 bool IsProtocolSupportedForMedia(const GURL& url) {
635 if (url.SchemeIsFile() ||
636 url.SchemeIs("http") ||
637 url.SchemeIs("https") ||
638 url.SchemeIs("data"))
639 return true;
640 return false;
641 }
642
643 void GetPlugins(bool refresh, 632 void GetPlugins(bool refresh,
644 std::vector<webkit::WebPluginInfo>* plugins) { 633 std::vector<webkit::WebPluginInfo>* plugins) {
645 if (refresh) 634 if (refresh)
646 webkit::npapi::PluginList::Singleton()->RefreshPlugins(); 635 webkit::npapi::PluginList::Singleton()->RefreshPlugins();
647 webkit::npapi::PluginList::Singleton()->GetPlugins(plugins); 636 webkit::npapi::PluginList::Singleton()->GetPlugins(plugins);
648 // Don't load the forked TestNetscapePlugIn in the chromium code, use 637 // Don't load the forked TestNetscapePlugIn in the chromium code, use
649 // the copy in webkit.org's repository instead. 638 // the copy in webkit.org's repository instead.
650 const FilePath::StringType kPluginBlackList[] = { 639 const FilePath::StringType kPluginBlackList[] = {
651 FILE_PATH_LITERAL("npapi_layout_test_plugin.dll"), 640 FILE_PATH_LITERAL("npapi_layout_test_plugin.dll"),
652 FILE_PATH_LITERAL("WebKitTestNetscapePlugIn.plugin"), 641 FILE_PATH_LITERAL("WebKitTestNetscapePlugIn.plugin"),
653 FILE_PATH_LITERAL("libnpapi_layout_test_plugin.so"), 642 FILE_PATH_LITERAL("libnpapi_layout_test_plugin.so"),
654 }; 643 };
655 for (int i = plugins->size() - 1; i >= 0; --i) { 644 for (int i = plugins->size() - 1; i >= 0; --i) {
656 webkit::WebPluginInfo plugin_info = plugins->at(i); 645 webkit::WebPluginInfo plugin_info = plugins->at(i);
657 for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) { 646 for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) {
658 if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) { 647 if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) {
659 plugins->erase(plugins->begin() + i); 648 plugins->erase(plugins->begin() + i);
660 } 649 }
661 } 650 }
662 } 651 }
663 } 652 }
664 653
665 } // namespace webkit_glue 654 } // namespace webkit_glue
OLDNEW
« webkit/glue/webkit_glue.h ('K') | « webkit/support/webkit_support_glue.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698