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