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