| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "v8_proxy.h" | 5 #include "v8_proxy.h" |
| 6 #undef LOG | 6 #undef LOG |
| 7 | 7 |
| 8 #include "webkit/tools/test_shell/test_shell.h" | 8 #include "webkit/tools/test_shell/test_shell.h" |
| 9 | 9 |
| 10 #include "base/base_paths.h" | 10 #include "base/base_paths.h" |
| (...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 bool IsMediaPlayerAvailable() { | 575 bool IsMediaPlayerAvailable() { |
| 576 return g_media_player_available; | 576 return g_media_player_available; |
| 577 } | 577 } |
| 578 | 578 |
| 579 void PrecacheUrl(const char16* url, int url_length) {} | 579 void PrecacheUrl(const char16* url, int url_length) {} |
| 580 | 580 |
| 581 void AppendToLog(const char* file, int line, const char* msg) { | 581 void AppendToLog(const char* file, int line, const char* msg) { |
| 582 logging::LogMessage(file, line).stream() << msg; | 582 logging::LogMessage(file, line).stream() << msg; |
| 583 } | 583 } |
| 584 | 584 |
| 585 #if !defined(LINUX2) | |
| 586 bool GetApplicationDirectory(std::wstring *path) { | 585 bool GetApplicationDirectory(std::wstring *path) { |
| 587 return PathService::Get(base::DIR_EXE, path); | 586 return PathService::Get(base::DIR_EXE, path); |
| 588 } | 587 } |
| 589 #endif | |
| 590 | 588 |
| 591 GURL GetInspectorURL() { | 589 GURL GetInspectorURL() { |
| 592 return GURL("test-shell-resource://inspector/inspector.html"); | 590 return GURL("test-shell-resource://inspector/inspector.html"); |
| 593 } | 591 } |
| 594 | 592 |
| 595 std::string GetUIResourceProtocol() { | 593 std::string GetUIResourceProtocol() { |
| 596 return "test-shell-resource"; | 594 return "test-shell-resource"; |
| 597 } | 595 } |
| 598 | 596 |
| 599 #if !defined(LINUX2) | |
| 600 bool GetExeDirectory(std::wstring *path) { | 597 bool GetExeDirectory(std::wstring *path) { |
| 601 return PathService::Get(base::DIR_EXE, path); | 598 return PathService::Get(base::DIR_EXE, path); |
| 602 } | 599 } |
| 603 #endif | |
| 604 | 600 |
| 605 bool SpellCheckWord(const wchar_t* word, int word_len, | 601 bool SpellCheckWord(const wchar_t* word, int word_len, |
| 606 int* misspelling_start, int* misspelling_len) { | 602 int* misspelling_start, int* misspelling_len) { |
| 607 // Report all words being correctly spelled. | 603 // Report all words being correctly spelled. |
| 608 *misspelling_start = 0; | 604 *misspelling_start = 0; |
| 609 *misspelling_len = 0; | 605 *misspelling_len = 0; |
| 610 return true; | 606 return true; |
| 611 } | 607 } |
| 612 | 608 |
| 613 #if !defined(LINUX2) | |
| 614 bool IsPluginRunningInRendererProcess() { | 609 bool IsPluginRunningInRendererProcess() { |
| 615 return true; | 610 return true; |
| 616 } | 611 } |
| 617 #endif | |
| 618 | 612 |
| 619 bool GetPluginFinderURL(std::string* plugin_finder_url) { | 613 bool GetPluginFinderURL(std::string* plugin_finder_url) { |
| 620 return false; | 614 return false; |
| 621 } | 615 } |
| 622 | 616 |
| 623 #if !defined(LINUX2) | |
| 624 bool IsDefaultPluginEnabled() { | 617 bool IsDefaultPluginEnabled() { |
| 625 #if defined(OS_WIN) | 618 #if defined(OS_WIN) |
| 626 FilePath exe_path; | 619 FilePath exe_path; |
| 627 | 620 |
| 628 if (PathService::Get(base::FILE_EXE, &exe_path)) { | 621 if (PathService::Get(base::FILE_EXE, &exe_path)) { |
| 629 std::wstring exe_name = file_util::GetFilenameFromPath( | 622 std::wstring exe_name = file_util::GetFilenameFromPath( |
| 630 exe_path.ToWStringHack()); | 623 exe_path.ToWStringHack()); |
| 631 if (StartsWith(exe_name, L"test_shell_tests", false)) | 624 if (StartsWith(exe_name, L"test_shell_tests", false)) |
| 632 return true; | 625 return true; |
| 633 } | 626 } |
| 634 #endif // OS_WIN | 627 #endif // OS_WIN |
| 635 return false; | 628 return false; |
| 636 } | 629 } |
| 637 | 630 |
| 638 std::wstring GetWebKitLocale() { | 631 std::wstring GetWebKitLocale() { |
| 639 return L"en-US"; | 632 return L"en-US"; |
| 640 } | 633 } |
| 641 #endif | |
| 642 | 634 |
| 643 } // namespace webkit_glue | 635 } // namespace webkit_glue |
| OLD | NEW |