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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp

Issue 1738073002: DevTools: introduce protocol::Value, baseline for hierarchical data in remote debugging protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
Index: third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp
index 6e0f2b6929773facdf05c09f5524b8f4c40ea446..0d4795c43f704a4b5cd9347cdb3481d65faa9075 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp
@@ -52,6 +52,7 @@
#include "platform/graphics/PictureSnapshot.h"
#include "platform/graphics/paint/SkPictureBuilder.h"
#include "platform/image-encoders/skia/PNGImageEncoder.h"
+#include "platform/inspector_protocol/Parser.h"
#include "platform/transforms/TransformationMatrix.h"
#include "public/platform/WebFloatPoint.h"
#include "public/platform/WebLayer.h"
@@ -434,13 +435,14 @@ void InspectorLayerTreeAgent::profileSnapshot(ErrorString* errorString, const St
}
}
-void InspectorLayerTreeAgent::snapshotCommandLog(ErrorString* errorString, const String& snapshotId, OwnPtr<Array<RefPtr<JSONObject>>>* commandLog)
+void InspectorLayerTreeAgent::snapshotCommandLog(ErrorString* errorString, const String& snapshotId, OwnPtr<Array<RefPtr<protocol::DictionaryValue>>>* commandLog)
{
const PictureSnapshot* snapshot = snapshotById(errorString, snapshotId);
if (!snapshot)
return;
protocol::ErrorSupport errors(errorString);
- *commandLog = Array<RefPtr<JSONObject>>::parse(snapshot->snapshotCommandLog(), &errors);
+ RefPtr<protocol::Value> logValue = protocol::parseJSON(snapshot->snapshotCommandLog()->toJSONString());
+ *commandLog = Array<RefPtr<protocol::DictionaryValue>>::parse(logValue, &errors);
}
void InspectorLayerTreeAgent::willAddPageOverlay(const GraphicsLayer* layer)

Powered by Google App Engine
This is Rietveld 408576698