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

Unified Diff: third_party/WebKit/Source/web/InspectorEmulationAgent.cpp

Issue 1621923002: [DevTools] Remove InspectorState. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: to JSONObject Created 4 years, 11 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/web/InspectorEmulationAgent.cpp
diff --git a/third_party/WebKit/Source/web/InspectorEmulationAgent.cpp b/third_party/WebKit/Source/web/InspectorEmulationAgent.cpp
index 4f3475a6c91bf24715d75977a28ff7c30997cc7c..dd373521e3e8339c318e6b804102689ca1d3dd6c 100644
--- a/third_party/WebKit/Source/web/InspectorEmulationAgent.cpp
+++ b/third_party/WebKit/Source/web/InspectorEmulationAgent.cpp
@@ -7,7 +7,6 @@
#include "core/frame/FrameHost.h"
#include "core/frame/FrameView.h"
#include "core/frame/Settings.h"
-#include "core/inspector/InspectorState.h"
#include "core/page/Page.h"
#include "platform/geometry/DoubleRect.h"
#include "web/DevToolsEmulator.h"
@@ -47,9 +46,11 @@ WebViewImpl* InspectorEmulationAgent::webViewImpl()
void InspectorEmulationAgent::restore()
{
ErrorString error;
- setScriptExecutionDisabled(&error, m_state->getBoolean(EmulationAgentState::scriptExecutionDisabled));
- setTouchEmulationEnabled(&error, m_state->getBoolean(EmulationAgentState::touchEventEmulationEnabled), nullptr);
- setEmulatedMedia(&error, m_state->getString(EmulationAgentState::emulatedMedia));
+ setScriptExecutionDisabled(&error, m_state->getBoolean(EmulationAgentState::scriptExecutionDisabled, false));
+ setTouchEmulationEnabled(&error, m_state->getBoolean(EmulationAgentState::touchEventEmulationEnabled, false), nullptr);
+ String emulatedMedia;
+ m_state->getString(EmulationAgentState::emulatedMedia, &emulatedMedia);
+ setEmulatedMedia(&error, emulatedMedia);
}
void InspectorEmulationAgent::disable(ErrorString*)

Powered by Google App Engine
This is Rietveld 408576698