| Index: webkit/support/platform_support_win.cc
|
| diff --git a/webkit/support/platform_support_win.cc b/webkit/support/platform_support_win.cc
|
| index 58d78be97e795644955fddeefd1e5b740ea97f56..ce601c5490ccbd2f24c85ced67a4ff80fe7e3eba 100644
|
| --- a/webkit/support/platform_support_win.cc
|
| +++ b/webkit/support/platform_support_win.cc
|
| @@ -17,51 +17,16 @@
|
| #include "ui/base/resource/resource_bundle.h"
|
| #include "webkit/support/test_webkit_platform_support.h"
|
|
|
| -#define MAX_LOADSTRING 100
|
| -
|
| -namespace {
|
| -
|
| -base::FilePath GetResourceFilePath(const char* ascii_name) {
|
| - base::FilePath path;
|
| - PathService::Get(base::DIR_EXE, &path);
|
| - path = path.AppendASCII("DumpRenderTree_resources");
|
| - return path.AppendASCII(ascii_name);
|
| -}
|
| -
|
| -base::StringPiece GetRawDataResource(HMODULE module, int resource_id) {
|
| - void* data_ptr;
|
| - size_t data_size;
|
| - return base::win::GetDataResourceFromModule(module, resource_id, &data_ptr,
|
| - &data_size)
|
| - ? base::StringPiece(static_cast<char*>(data_ptr), data_size)
|
| - : base::StringPiece();
|
| -}
|
| -
|
| -base::StringPiece ResourceProvider(int key) {
|
| - return GetRawDataResource(::GetModuleHandle(NULL), key);
|
| -}
|
| -
|
| -} // namespace
|
|
|
| namespace webkit_support {
|
|
|
| -// TODO(tkent): Implement some of the followings for platform-dependent tasks
|
| -// such as loading resource.
|
| -
|
| void BeforeInitialize() {
|
| }
|
|
|
| void AfterInitialize() {
|
| - // TODO(dpranke): update other resource loading to use the pak
|
| - // instead of loading resources directly compiled in.
|
| - base::FilePath path;
|
| - PathService::Get(base::DIR_EXE, &path);
|
| - path = path.AppendASCII("DumpRenderTree.pak");
|
| - ResourceBundle::InitSharedInstanceWithPakPath(path);
|
| }
|
|
|
| void BeforeShutdown() {
|
| - ResourceBundle::CleanupSharedInstance();
|
| }
|
|
|
| void AfterShutdown() {
|
| @@ -69,47 +34,3 @@ void AfterShutdown() {
|
|
|
| } // namespace webkit_support
|
|
|
| -base::string16 TestWebKitPlatformSupport::GetLocalizedString(int message_id) {
|
| - wchar_t localized[MAX_LOADSTRING];
|
| - int length = ::LoadString(::GetModuleHandle(NULL), message_id,
|
| - localized, MAX_LOADSTRING);
|
| - if (!length && ::GetLastError() == ERROR_RESOURCE_NAME_NOT_FOUND) {
|
| - NOTREACHED();
|
| - return L"No string for this identifier!";
|
| - }
|
| - return base::string16(localized, length);
|
| -}
|
| -
|
| -base::StringPiece TestWebKitPlatformSupport::GetDataResource(
|
| - int resource_id,
|
| - ui::ScaleFactor scale_factor) {
|
| - switch (resource_id) {
|
| - case IDR_BROKENIMAGE: {
|
| - // Use webkit's broken image icon (16x16)
|
| - static std::string broken_image_data;
|
| - if (broken_image_data.empty()) {
|
| - base::FilePath path = GetResourceFilePath("missingImage.gif");
|
| - bool success = file_util::ReadFileToString(path, &broken_image_data);
|
| - if (!success) {
|
| - LOG(FATAL) << "Failed reading: " << path.value();
|
| - }
|
| - }
|
| - return broken_image_data;
|
| - }
|
| - case IDR_TEXTAREA_RESIZER: {
|
| - // Use webkit's text area resizer image.
|
| - static std::string resize_corner_data;
|
| - if (resize_corner_data.empty()) {
|
| - base::FilePath path = GetResourceFilePath("textAreaResizeCorner.png");
|
| - bool success = file_util::ReadFileToString(path, &resize_corner_data);
|
| - if (!success) {
|
| - LOG(FATAL) << "Failed reading: " << path.value();
|
| - }
|
| - }
|
| - return resize_corner_data;
|
| - }
|
| - }
|
| -
|
| - // TODO(flackr): Pass scale_factor to ResourceProvider.
|
| - return ResourceProvider(resource_id);
|
| -}
|
|
|