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