| 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" |
| 11 #include "core/css/CSSStyleRule.h" | 11 #include "core/css/CSSStyleRule.h" |
| 12 #include "core/css/MediaList.h" | 12 #include "core/css/MediaList.h" |
| 13 #include "core/dom/NodeComputedStyle.h" | 13 #include "core/dom/NodeComputedStyle.h" |
| 14 #include "core/dom/StaticNodeList.h" | 14 #include "core/dom/StaticNodeList.h" |
| 15 #include "core/frame/FrameView.h" | 15 #include "core/frame/FrameView.h" |
| 16 #include "core/inspector/InspectorCSSAgent.h" | 16 #include "core/inspector/InspectorCSSAgent.h" |
| 17 #include "core/inspector/InspectorDOMAgent.h" | 17 #include "core/inspector/InspectorDOMAgent.h" |
| 18 #include "core/inspector/InspectorHighlight.h" | 18 #include "core/inspector/InspectorHighlight.h" |
| 19 #include "core/style/ComputedStyle.h" | 19 #include "core/style/ComputedStyle.h" |
| 20 #include "platform/ScriptForbiddenScope.h" | 20 #include "platform/ScriptForbiddenScope.h" |
| 21 #include "platform/inspector_protocol/Values.h" | |
| 22 | 21 |
| 23 namespace blink { | 22 namespace blink { |
| 24 | 23 |
| 25 namespace { | 24 namespace { |
| 26 | 25 |
| 27 std::unique_ptr<protocol::DictionaryValue> createAnchor(const String& type, cons
t String& propertyName, std::unique_ptr<protocol::DictionaryValue> valueDescript
ion) | 26 std::unique_ptr<protocol::DictionaryValue> createAnchor(const String& type, cons
t String& propertyName, std::unique_ptr<protocol::DictionaryValue> valueDescript
ion) |
| 28 { | 27 { |
| 29 std::unique_ptr<protocol::DictionaryValue> object = protocol::DictionaryValu
e::create(); | 28 std::unique_ptr<protocol::DictionaryValue> object = protocol::DictionaryValu
e::create(); |
| 30 object->setString("type", type); | 29 object->setString("type", type); |
| 31 object->setString("propertyName", propertyName); | 30 object->setString("propertyName", propertyName); |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 void LayoutEditor::evaluateInOverlay(const String& method, std::unique_ptr<proto
col::Value> argument) const | 412 void LayoutEditor::evaluateInOverlay(const String& method, std::unique_ptr<proto
col::Value> argument) const |
| 414 { | 413 { |
| 415 ScriptForbiddenScope::AllowUserAgentScript allowScript; | 414 ScriptForbiddenScope::AllowUserAgentScript allowScript; |
| 416 std::unique_ptr<protocol::ListValue> command = protocol::ListValue::create()
; | 415 std::unique_ptr<protocol::ListValue> command = protocol::ListValue::create()
; |
| 417 command->pushValue(protocol::StringValue::create(method)); | 416 command->pushValue(protocol::StringValue::create(method)); |
| 418 command->pushValue(std::move(argument)); | 417 command->pushValue(std::move(argument)); |
| 419 m_scriptController->executeScriptInMainWorld("dispatch(" + command->toJSONSt
ring() + ")", ScriptController::ExecuteScriptWhenScriptsDisabled); | 418 m_scriptController->executeScriptInMainWorld("dispatch(" + command->toJSONSt
ring() + ")", ScriptController::ExecuteScriptWhenScriptsDisabled); |
| 420 } | 419 } |
| 421 | 420 |
| 422 } // namespace blink | 421 } // namespace blink |
| OLD | NEW |