| 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/inspector/protocol/Protocol.h" |
| 19 #include "core/style/ComputedStyle.h" | 20 #include "core/style/ComputedStyle.h" |
| 20 #include "platform/ScriptForbiddenScope.h" | 21 #include "platform/ScriptForbiddenScope.h" |
| 21 | 22 |
| 22 namespace blink { | 23 namespace blink { |
| 23 | 24 |
| 24 namespace { | 25 namespace { |
| 25 | 26 |
| 26 std::unique_ptr<protocol::DictionaryValue> createAnchor(const String& type, cons
t String& propertyName, std::unique_ptr<protocol::DictionaryValue> valueDescript
ion) | 27 std::unique_ptr<protocol::DictionaryValue> createAnchor(const String& type, cons
t String& propertyName, std::unique_ptr<protocol::DictionaryValue> valueDescript
ion) |
| 27 { | 28 { |
| 28 std::unique_ptr<protocol::DictionaryValue> object = protocol::DictionaryValu
e::create(); | 29 std::unique_ptr<protocol::DictionaryValue> object = protocol::DictionaryValu
e::create(); |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 void LayoutEditor::evaluateInOverlay(const String& method, std::unique_ptr<proto
col::Value> argument) const | 413 void LayoutEditor::evaluateInOverlay(const String& method, std::unique_ptr<proto
col::Value> argument) const |
| 413 { | 414 { |
| 414 ScriptForbiddenScope::AllowUserAgentScript allowScript; | 415 ScriptForbiddenScope::AllowUserAgentScript allowScript; |
| 415 std::unique_ptr<protocol::ListValue> command = protocol::ListValue::create()
; | 416 std::unique_ptr<protocol::ListValue> command = protocol::ListValue::create()
; |
| 416 command->pushValue(protocol::StringValue::create(method)); | 417 command->pushValue(protocol::StringValue::create(method)); |
| 417 command->pushValue(std::move(argument)); | 418 command->pushValue(std::move(argument)); |
| 418 m_scriptController->executeScriptInMainWorld("dispatch(" + command->toJSONSt
ring() + ")", ScriptController::ExecuteScriptWhenScriptsDisabled); | 419 m_scriptController->executeScriptInMainWorld("dispatch(" + command->toJSONSt
ring() + ")", ScriptController::ExecuteScriptWhenScriptsDisabled); |
| 419 } | 420 } |
| 420 | 421 |
| 421 } // namespace blink | 422 } // namespace blink |
| OLD | NEW |