| 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 #ifndef LayoutEditor_h | 5 #ifndef LayoutEditor_h |
| 6 #define LayoutEditor_h | 6 #define LayoutEditor_h |
| 7 | 7 |
| 8 #include "core/CSSPropertyNames.h" |
| 9 #include "core/dom/Node.h" |
| 10 #include "core/inspector/InspectorOverlayHost.h" |
| 8 #include "platform/heap/Handle.h" | 11 #include "platform/heap/Handle.h" |
| 9 #include "wtf/PassOwnPtr.h" | 12 #include "wtf/PassOwnPtr.h" |
| 10 #include "wtf/RefPtr.h" | 13 #include "wtf/RefPtr.h" |
| 14 #include "wtf/text/WTFString.h" |
| 11 | 15 |
| 12 namespace blink { | 16 namespace blink { |
| 13 | 17 |
| 14 class JSONObject; | 18 class JSONObject; |
| 15 class Node; | 19 class InspectorCSSAgent; |
| 16 | 20 |
| 17 class LayoutEditor final : public NoBaseWillBeGarbageCollected<LayoutEditor> { | 21 class LayoutEditor final: public NoBaseWillBeGarbageCollected<LayoutEditor>, pub
lic InspectorOverlayHost::LayoutEditorListener { |
| 18 public: | 22 public: |
| 19 static PassOwnPtrWillBeRawPtr<LayoutEditor> create(Node* node) | 23 static PassOwnPtrWillBeRawPtr<LayoutEditor> create(InspectorCSSAgent* cssAge
nt) |
| 20 { | 24 { |
| 21 return adoptPtrWillBeNoop(new LayoutEditor(node)); | 25 return adoptPtrWillBeNoop(new LayoutEditor(cssAgent)); |
| 22 } | 26 } |
| 27 |
| 28 void setNode(Node*); |
| 23 PassRefPtr<JSONObject> buildJSONInfo() const; | 29 PassRefPtr<JSONObject> buildJSONInfo() const; |
| 24 | 30 |
| 25 DEFINE_INLINE_TRACE() | 31 DEFINE_INLINE_TRACE() |
| 26 { | 32 { |
| 27 visitor->trace(m_node); | 33 visitor->trace(m_node); |
| 34 visitor->trace(m_cssAgent); |
| 28 } | 35 } |
| 29 | 36 |
| 30 private: | 37 private: |
| 31 explicit LayoutEditor(Node*); | 38 explicit LayoutEditor(InspectorCSSAgent*); |
| 39 |
| 40 // InspectorOverlayHost::LayoutEditorListener implementation. |
| 41 void overlayStartedPropertyChange(const String&) override; |
| 42 void overlayPropertyChanged(float) override; |
| 43 void overlayEndedPropertyChange() override; |
| 32 | 44 |
| 33 RefPtrWillBeMember<Node> m_node; | 45 RefPtrWillBeMember<Node> m_node; |
| 46 RawPtrWillBeMember<InspectorCSSAgent> m_cssAgent; |
| 47 CSSPropertyID m_changingProperty; |
| 48 float m_propertyInitialValue; |
| 34 }; | 49 }; |
| 35 | 50 |
| 36 } // namespace blink | 51 } // namespace blink |
| 37 | 52 |
| 38 | 53 |
| 39 #endif // !defined(LayoutEditor_h) | 54 #endif // !defined(LayoutEditor_h) |
| OLD | NEW |