Index: sky/viewer/platform/platform_impl.cc |
diff --git a/sky/viewer/platform/platform_impl.cc b/sky/viewer/platform/platform_impl.cc |
index 2315c4560d35d921da38259599ef7b6c8fb6c7cd..e195fa31cb4e0577a1681159da947896f1f6f73c 100644 |
--- a/sky/viewer/platform/platform_impl.cc |
+++ b/sky/viewer/platform/platform_impl.cc |
@@ -7,6 +7,9 @@ |
#include <cmath> |
#include "base/debug/trace_event.h" |
+#include "base/files/file_path.h" |
+#include "base/files/file_util.h" |
+#include "base/path_service.h" |
#include "base/rand_util.h" |
#include "base/stl_util.h" |
#include "base/synchronization/waitable_event.h" |
@@ -235,4 +238,26 @@ void PlatformImpl::updateTraceEventDuration( |
category_group_enabled, name, traceEventHandle); |
} |
+blink::WebData PlatformImpl::loadResource(const char* name) |
eseidel
2014/11/18 19:38:48
This is a hack for now. Eventually we may be able
|
+{ |
abarth-chromium
2014/11/18 22:37:37
Merge with previous line.
|
+ base::FilePath root_dir; |
+ PathService::Get(base::DIR_SOURCE_ROOT, &root_dir); |
+ base::FilePath engine_dir = root_dir.AppendASCII("sky").AppendASCII("engine"); |
+ base::FilePath v8_dir = engine_dir.AppendASCII("bindings").AppendASCII("core").AppendASCII("v8"); |
+ base::FilePath inspector_dir = engine_dir.AppendASCII("core").AppendASCII("inspector"); |
abarth-chromium
2014/11/18 22:37:37
Can you file a bug about this too? We won't have
|
+ |
+ base::FilePath path; |
+ if (std::string("InjectedScriptSource.js") == name) |
+ path = inspector_dir.AppendASCII(name); |
+ else if (std::string("DebuggerScript.js") == name) |
+ path = v8_dir.AppendASCII(name); |
+ else |
+ CHECK(false); |
+ |
+ std::string buffer; |
+ base::ReadFileToString(path, &buffer); |
+ CHECK(!buffer.empty()); |
+ return blink::WebData(buffer.data(), buffer.size()); |
+} |
+ |
} // namespace sky |