| Index: webkit/tools/test_shell/test_shell_win.cc
|
| diff --git a/webkit/tools/test_shell/test_shell_win.cc b/webkit/tools/test_shell/test_shell_win.cc
|
| index dd6682aaf781b62119c71bc24326ff28808263af..a6ba57179ea23f59394a7e6881d3f08ec2d054dd 100644
|
| --- a/webkit/tools/test_shell/test_shell_win.cc
|
| +++ b/webkit/tools/test_shell/test_shell_win.cc
|
| @@ -17,6 +17,7 @@
|
| #include "base/path_service.h"
|
| #include "base/resource_util.h"
|
| #include "base/stack_container.h"
|
| +#include "base/string_piece.h"
|
| #include "base/string_util.h"
|
| #include "base/trace_event.h"
|
| #include "base/win_util.h"
|
| @@ -111,6 +112,14 @@ bool MinidumpCallback(const wchar_t *dumpPath,
|
| return false;
|
| }
|
|
|
| +StringPiece GetRawDataResource(HMODULE module, int resource_id) {
|
| + void* data_ptr;
|
| + size_t data_size;
|
| + return base::GetDataResourceFromModule(module, resource_id, &data_ptr,
|
| + &data_size) ?
|
| + StringPiece(static_cast<char*>(data_ptr), data_size) : StringPiece();
|
| +}
|
| +
|
| } // namespace
|
|
|
| // Initialize static member variable
|
| @@ -690,6 +699,12 @@ void TestShell::ShowStartupDebuggingDialog() {
|
| MessageBox(NULL, L"attach to me?", L"test_shell", MB_OK);
|
| }
|
|
|
| +// static
|
| +StringPiece TestShell::NetResourceProvider(int key) {
|
| + return GetRawDataResource(::GetModuleHandle(NULL), key);
|
| +}
|
| +
|
| +
|
| /////////////////////////////////////////////////////////////////////////////
|
| // WebKit glue functions
|
|
|
|
|