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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorPageAgent.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/InspectorPageAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
index 7e83f2a6a19c6c00e0f08884d337b0772ef398ce..f897431a2d3b56b96bae2ab7695bc60b09bf9fc7 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
@@ -59,10 +59,10 @@
#include "core/inspector/InstrumentingAgents.h"
#include "core/loader/DocumentLoader.h"
#include "core/loader/FrameLoader.h"
-#include "platform/JSONValues.h"
#include "platform/MIMETypeRegistry.h"
#include "platform/PlatformResourceLoader.h"
#include "platform/UserGestureIndicator.h"
+#include "platform/inspector_protocol/Values.h"
#include "platform/v8_inspector/public/V8ContentSearchUtil.h"
#include "platform/weborigin/SecurityOrigin.h"
#include "wtf/CurrentTime.h"
@@ -388,9 +388,9 @@ void InspectorPageAgent::disable(ErrorString*)
void InspectorPageAgent::addScriptToEvaluateOnLoad(ErrorString*, const String& source, String* identifier)
{
- RefPtr<JSONObject> scripts = m_state->getObject(PageAgentState::pageAgentScriptsToEvaluateOnLoad);
+ RefPtr<protocol::DictionaryValue> scripts = m_state->getObject(PageAgentState::pageAgentScriptsToEvaluateOnLoad);
if (!scripts) {
- scripts = JSONObject::create();
+ scripts = protocol::DictionaryValue::create();
m_state->setObject(PageAgentState::pageAgentScriptsToEvaluateOnLoad, scripts);
}
// Assure we don't override existing ids -- m_lastScriptIdentifier could get out of sync WRT actual
@@ -403,7 +403,7 @@ void InspectorPageAgent::addScriptToEvaluateOnLoad(ErrorString*, const String& s
void InspectorPageAgent::removeScriptToEvaluateOnLoad(ErrorString* error, const String& identifier)
{
- RefPtr<JSONObject> scripts = m_state->getObject(PageAgentState::pageAgentScriptsToEvaluateOnLoad);
+ RefPtr<protocol::DictionaryValue> scripts = m_state->getObject(PageAgentState::pageAgentScriptsToEvaluateOnLoad);
if (!scripts || scripts->find(identifier) == scripts->end()) {
*error = "Script not found";
return;
@@ -589,7 +589,7 @@ void InspectorPageAgent::didClearDocumentOfWindowObject(LocalFrame* frame)
if (!frontend())
return;
- RefPtr<JSONObject> scripts = m_state->getObject(PageAgentState::pageAgentScriptsToEvaluateOnLoad);
+ RefPtr<protocol::DictionaryValue> scripts = m_state->getObject(PageAgentState::pageAgentScriptsToEvaluateOnLoad);
if (scripts) {
for (const auto& script : *scripts) {
String scriptText;

Powered by Google App Engine
This is Rietveld 408576698