OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/inspector/LayoutEditor.h" | 5 #include "core/inspector/LayoutEditor.h" |
6 | 6 |
7 #include "bindings/core/v8/ScriptController.h" | 7 #include "bindings/core/v8/ScriptController.h" |
8 #include "core/css/CSSComputedStyleDeclaration.h" | 8 #include "core/css/CSSComputedStyleDeclaration.h" |
9 #include "core/css/CSSImportRule.h" | 9 #include "core/css/CSSImportRule.h" |
10 #include "core/css/CSSMediaRule.h" | 10 #include "core/css/CSSMediaRule.h" |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 } | 424 } |
425 | 425 |
426 void LayoutEditor::evaluateInOverlay( | 426 void LayoutEditor::evaluateInOverlay( |
427 const String& method, | 427 const String& method, |
428 std::unique_ptr<protocol::Value> argument) const { | 428 std::unique_ptr<protocol::Value> argument) const { |
429 ScriptForbiddenScope::AllowUserAgentScript allowScript; | 429 ScriptForbiddenScope::AllowUserAgentScript allowScript; |
430 std::unique_ptr<protocol::ListValue> command = protocol::ListValue::create(); | 430 std::unique_ptr<protocol::ListValue> command = protocol::ListValue::create(); |
431 command->pushValue(protocol::StringValue::create(method)); | 431 command->pushValue(protocol::StringValue::create(method)); |
432 command->pushValue(std::move(argument)); | 432 command->pushValue(std::move(argument)); |
433 m_scriptController->executeScriptInMainWorld( | 433 m_scriptController->executeScriptInMainWorld( |
434 "dispatch(" + command->toJSONString() + ")", | 434 "dispatch(" + command->serialize() + ")", |
435 ScriptController::ExecuteScriptWhenScriptsDisabled); | 435 ScriptController::ExecuteScriptWhenScriptsDisabled); |
436 } | 436 } |
437 | 437 |
438 } // namespace blink | 438 } // namespace blink |
OLD | NEW |