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

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

Issue 1311353007: Devtools: Save custom formatter's state in the runtimeAgent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorRuntimeAgent.cpp
diff --git a/Source/core/inspector/InspectorRuntimeAgent.cpp b/Source/core/inspector/InspectorRuntimeAgent.cpp
index 25fd76fedf0e5d9c824c038eb2a9cda9cee6f425..39ee7c4d239b6f521646fe309e56ddfc7a6da97e 100644
--- a/Source/core/inspector/InspectorRuntimeAgent.cpp
+++ b/Source/core/inspector/InspectorRuntimeAgent.cpp
@@ -45,6 +45,7 @@ namespace blink {
namespace InspectorRuntimeAgentState {
static const char runtimeEnabled[] = "runtimeEnabled";
+static const char customObjectFormatterEnabled[] = "customObjectFormatterEnabled";
};
class InspectorRuntimeAgent::InjectedScriptCallScope {
@@ -196,6 +197,7 @@ void InspectorRuntimeAgent::isRunRequired(ErrorString*, bool* out_result)
void InspectorRuntimeAgent::setCustomObjectFormatterEnabled(ErrorString*, bool enabled)
{
+ m_state->setBoolean(InspectorRuntimeAgentState::customObjectFormatterEnabled, enabled);
injectedScriptManager()->setCustomObjectFormatterEnabled(enabled);
}
@@ -205,6 +207,8 @@ void InspectorRuntimeAgent::restore()
frontend()->executionContextsCleared();
String error;
enable(&error);
+ if (m_state->getBoolean(InspectorRuntimeAgentState::customObjectFormatterEnabled))
+ injectedScriptManager()->setCustomObjectFormatterEnabled(true);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698