Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: Source/core/inspector/LayoutEditor.h

Issue 1212373003: Devtools [LayouEditor]: Show label with size info (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address comments Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/inspector/InspectorPageAgent.cpp ('k') | Source/core/inspector/LayoutEditor.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 class CSSPrimitiveValue;
20 21
21 class LayoutEditor final: public NoBaseWillBeGarbageCollectedFinalized<LayoutEdi tor>, public InspectorOverlayHost::LayoutEditorListener { 22 class LayoutEditor final: public NoBaseWillBeGarbageCollectedFinalized<LayoutEdi tor>, public InspectorOverlayHost::LayoutEditorListener {
22 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(LayoutEditor); 23 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(LayoutEditor);
23 public: 24 public:
24 static PassOwnPtrWillBeRawPtr<LayoutEditor> create(InspectorCSSAgent* cssAge nt) 25 static PassOwnPtrWillBeRawPtr<LayoutEditor> create(InspectorCSSAgent* cssAge nt)
25 { 26 {
26 return adoptPtrWillBeNoop(new LayoutEditor(cssAgent)); 27 return adoptPtrWillBeNoop(new LayoutEditor(cssAgent));
27 } 28 }
28 29
29 void setNode(Node*); 30 void setNode(Node*);
30 PassRefPtr<JSONObject> buildJSONInfo() const; 31 PassRefPtr<JSONObject> buildJSONInfo() const;
31 32
32 DECLARE_VIRTUAL_TRACE(); 33 DECLARE_VIRTUAL_TRACE();
33 34
34 private: 35 private:
35 explicit LayoutEditor(InspectorCSSAgent*); 36 explicit LayoutEditor(InspectorCSSAgent*);
37 RefPtrWillBeRawPtr<CSSPrimitiveValue> getPropertyCSSValue(CSSPropertyID) con st;
38 PassRefPtr<JSONObject> createValueDescription(const String&) const;
36 39
37 // InspectorOverlayHost::LayoutEditorListener implementation. 40 // InspectorOverlayHost::LayoutEditorListener implementation.
38 void overlayStartedPropertyChange(const String&) override; 41 void overlayStartedPropertyChange(const String&) override;
39 void overlayPropertyChanged(float) override; 42 void overlayPropertyChanged(float) override;
40 void overlayEndedPropertyChange() override; 43 void overlayEndedPropertyChange() override;
41 44
42 RefPtrWillBeMember<Node> m_node; 45 RefPtrWillBeMember<Node> m_node;
43 RawPtrWillBeMember<InspectorCSSAgent> m_cssAgent; 46 RawPtrWillBeMember<InspectorCSSAgent> m_cssAgent;
44 CSSPropertyID m_changingProperty; 47 CSSPropertyID m_changingProperty;
45 float m_propertyInitialValue; 48 float m_propertyInitialValue;
46 }; 49 };
47 50
48 } // namespace blink 51 } // namespace blink
49 52
50 53
51 #endif // !defined(LayoutEditor_h) 54 #endif // !defined(LayoutEditor_h)
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorPageAgent.cpp ('k') | Source/core/inspector/LayoutEditor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698