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

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

Issue 5938002: Remove legacy non-client-based geolocation code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove non-client-based geolocation code. Created 9 years, 11 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
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 #include "webkit/tools/test_shell/accessibility_controller.h" 51 #include "webkit/tools/test_shell/accessibility_controller.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 #if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
62 #include "third_party/WebKit/WebKit/chromium/public/WebGeolocationClientMock.h"
63 #endif
64
65 using WebKit::WebCanvas; 61 using WebKit::WebCanvas;
66 using WebKit::WebFrame; 62 using WebKit::WebFrame;
67 using WebKit::WebNavigationPolicy; 63 using WebKit::WebNavigationPolicy;
68 using WebKit::WebRect; 64 using WebKit::WebRect;
69 using WebKit::WebScriptController; 65 using WebKit::WebScriptController;
70 using WebKit::WebSize; 66 using WebKit::WebSize;
71 using WebKit::WebURLRequest; 67 using WebKit::WebURLRequest;
72 using WebKit::WebView; 68 using WebKit::WebView;
73 69
74 namespace { 70 namespace {
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 void TestShell::SizeToDefault() { 640 void TestShell::SizeToDefault() {
645 SizeTo(kTestWindowWidth, kTestWindowHeight); 641 SizeTo(kTestWindowWidth, kTestWindowHeight);
646 } 642 }
647 643
648 void TestShell::ResetTestController() { 644 void TestShell::ResetTestController() {
649 accessibility_controller_->Reset(); 645 accessibility_controller_->Reset();
650 layout_test_controller_->Reset(); 646 layout_test_controller_->Reset();
651 event_sending_controller_->Reset(); 647 event_sending_controller_->Reset();
652 notification_presenter_->Reset(); 648 notification_presenter_->Reset();
653 delegate_->Reset(); 649 delegate_->Reset();
654 #if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
655 if (geolocation_client_mock_.get()) 650 if (geolocation_client_mock_.get())
656 geolocation_client_mock_->resetMock(); 651 geolocation_client_mock_->resetMock();
657 #endif
658 } 652 }
659 653
660 void TestShell::LoadFile(const FilePath& file) { 654 void TestShell::LoadFile(const FilePath& file) {
661 LoadURLForFrame(net::FilePathToFileURL(file), std::wstring()); 655 LoadURLForFrame(net::FilePathToFileURL(file), std::wstring());
662 } 656 }
663 657
664 void TestShell::LoadURL(const GURL& url) { 658 void TestShell::LoadURL(const GURL& url) {
665 // Used as a sentinal for run_webkit_tests.py to know when to start reading 659 // Used as a sentinal for run_webkit_tests.py to know when to start reading
666 // test output for this test and so we know we're not getting out of sync. 660 // test output for this test and so we know we're not getting out of sync.
667 if (layout_test_mode_ && dump_when_finished_ && test_params()) 661 if (layout_test_mode_ && dump_when_finished_ && test_params())
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 speech_input_controller_mock_.reset( 781 speech_input_controller_mock_.reset(
788 WebKit::WebSpeechInputControllerMock::create(listener)); 782 WebKit::WebSpeechInputControllerMock::create(listener));
789 return speech_input_controller_mock_.get(); 783 return speech_input_controller_mock_.get();
790 } 784 }
791 785
792 WebKit::WebSpeechInputControllerMock* 786 WebKit::WebSpeechInputControllerMock*
793 TestShell::speech_input_controller_mock() { 787 TestShell::speech_input_controller_mock() {
794 return speech_input_controller_mock_.get(); 788 return speech_input_controller_mock_.get();
795 } 789 }
796 790
797 #if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
798 WebKit::WebGeolocationClientMock* TestShell::geolocation_client_mock() { 791 WebKit::WebGeolocationClientMock* TestShell::geolocation_client_mock() {
799 if (!geolocation_client_mock_.get()) { 792 if (!geolocation_client_mock_.get()) {
800 geolocation_client_mock_.reset( 793 geolocation_client_mock_.reset(
801 WebKit::WebGeolocationClientMock::create()); 794 WebKit::WebGeolocationClientMock::create());
802 } 795 }
803 return geolocation_client_mock_.get(); 796 return geolocation_client_mock_.get();
804 } 797 }
805 #endif
806 798
807 //----------------------------------------------------------------------------- 799 //-----------------------------------------------------------------------------
808 800
809 namespace webkit_glue { 801 namespace webkit_glue {
810 802
811 void PrecacheUrl(const char16* url, int url_length) {} 803 void PrecacheUrl(const char16* url, int url_length) {}
812 804
813 void AppendToLog(const char* file, int line, const char* msg) { 805 void AppendToLog(const char* file, int line, const char* msg) {
814 logging::LogMessage(file, line).stream() << msg; 806 logging::LogMessage(file, line).stream() << msg;
815 } 807 }
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) { 905 for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) {
914 if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) { 906 if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) {
915 webkit::npapi::PluginList::Singleton()->DisablePlugin(plugin_info.path); 907 webkit::npapi::PluginList::Singleton()->DisablePlugin(plugin_info.path);
916 plugins->erase(plugins->begin() + i); 908 plugins->erase(plugins->begin() + i);
917 } 909 }
918 } 910 }
919 } 911 }
920 } 912 }
921 913
922 } // namespace webkit_glue 914 } // namespace webkit_glue
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698