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

Unified Diff: Source/core/inspector/InspectorOverlay.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/inspector/InjectedScriptManager.cpp ('k') | Source/core/xml/XMLTreeViewer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorOverlay.cpp
diff --git a/Source/core/inspector/InspectorOverlay.cpp b/Source/core/inspector/InspectorOverlay.cpp
index 80ae31ff8e997ec0f4c89f7e87b05bda73293e6a..d6a35a843604e7a253086f9e9f46c58b46ce3e0f 100644
--- a/Source/core/inspector/InspectorOverlay.cpp
+++ b/Source/core/inspector/InspectorOverlay.cpp
@@ -32,7 +32,6 @@
#include "bindings/core/v8/ScriptController.h"
#include "bindings/core/v8/ScriptSourceCode.h"
#include "bindings/core/v8/V8InspectorOverlayHost.h"
-#include "core/InspectorOverlayPage.h"
#include "core/dom/Element.h"
#include "core/dom/Node.h"
#include "core/dom/PseudoElement.h"
@@ -56,6 +55,8 @@
#include "platform/PlatformMouseEvent.h"
#include "platform/ScriptForbiddenScope.h"
#include "platform/graphics/GraphicsContextStateSaver.h"
+#include "public/platform/Platform.h"
+#include "public/platform/WebData.h"
#include "wtf/text/StringBuilder.h"
#include <v8.h>
@@ -717,7 +718,8 @@ Page* InspectorOverlay::overlayPage()
frame->view()->setCanHaveScrollbars(false);
frame->view()->setTransparent(true);
- RefPtr<SharedBuffer> data = SharedBuffer::create(reinterpret_cast<const char*>(InspectorOverlayPage_html), sizeof(InspectorOverlayPage_html));
+ const blink::WebData& overlayPageHTMLResource = blink::Platform::current()->loadResource("InspectorOverlayPage.html");
+ RefPtr<SharedBuffer> data = SharedBuffer::create(overlayPageHTMLResource.data(), overlayPageHTMLResource.size());
loader.load(FrameLoadRequest(0, blankURL(), SubstituteData(data, "text/html", "UTF-8", KURL(), ForceSynchronousLoad)));
v8::Isolate* isolate = toIsolate(frame.get());
ScriptState* scriptState = ScriptState::forMainWorld(frame.get());
« no previous file with comments | « Source/core/inspector/InjectedScriptManager.cpp ('k') | Source/core/xml/XMLTreeViewer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698