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

Unified Diff: Source/core/inspector/InjectedScriptCanvasModule.cpp

Issue 391963002: [Blink] XMLTreeViewer should load resources from blink_resources.grd instead of relying upon xxd.py (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/core_generated.gyp ('k') | Source/core/inspector/InjectedScriptManager.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InjectedScriptCanvasModule.cpp
diff --git a/Source/core/inspector/InjectedScriptCanvasModule.cpp b/Source/core/inspector/InjectedScriptCanvasModule.cpp
index 6543b3c7cfa93b4570a4732ded11e5080ba0e588..e9877485fa678a891c17bd5c7e6d11024d849b0c 100644
--- a/Source/core/inspector/InjectedScriptCanvasModule.cpp
+++ b/Source/core/inspector/InjectedScriptCanvasModule.cpp
@@ -33,7 +33,8 @@
#include "bindings/core/v8/ScriptFunctionCall.h"
#include "bindings/core/v8/ScriptValue.h"
-#include "core/InjectedScriptCanvasModuleSource.h"
+#include "public/platform/Platform.h"
+#include "public/platform/WebData.h"
using blink::TypeBuilder::Array;
using blink::TypeBuilder::Canvas::ResourceId;
@@ -58,7 +59,8 @@ InjectedScriptCanvasModule InjectedScriptCanvasModule::moduleForState(InjectedSc
String InjectedScriptCanvasModule::source() const
{
- return String(reinterpret_cast<const char*>(InjectedScriptCanvasModuleSource_js), sizeof(InjectedScriptCanvasModuleSource_js));
+ const blink::WebData& canvasModuleSourceResource = blink::Platform::current()->loadResource("InjectedScriptCanvasModuleSource.js");
+ return String(canvasModuleSourceResource.data(), canvasModuleSourceResource.size());
}
ScriptValue InjectedScriptCanvasModule::wrapCanvas2DContext(const ScriptValue& context)
« no previous file with comments | « Source/core/core_generated.gyp ('k') | Source/core/inspector/InjectedScriptManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698