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

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

Issue 137943002: Update more core classes to use OVERRIDE / FINAL when needed (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/inspector/InspectorAgent.h ('k') | Source/core/inspector/InspectorConsoleAgent.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010, Google Inc. All rights reserved. 2 * Copyright (C) 2010, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 class MediaList; 56 class MediaList;
57 class Node; 57 class Node;
58 class NodeList; 58 class NodeList;
59 class PlatformFontUsage; 59 class PlatformFontUsage;
60 class RenderText; 60 class RenderText;
61 class StyleResolver; 61 class StyleResolver;
62 class UpdateRegionLayoutTask; 62 class UpdateRegionLayoutTask;
63 63
64 typedef HashMap<CSSStyleSheet*, RefPtr<InspectorStyleSheet> > CSSStyleSheetToIns pectorStyleSheet; 64 typedef HashMap<CSSStyleSheet*, RefPtr<InspectorStyleSheet> > CSSStyleSheetToIns pectorStyleSheet;
65 65
66 class InspectorCSSAgent 66 class InspectorCSSAgent FINAL
67 : public InspectorBaseAgent<InspectorCSSAgent> 67 : public InspectorBaseAgent<InspectorCSSAgent>
68 , public InspectorDOMAgent::DOMListener 68 , public InspectorDOMAgent::DOMListener
69 , public InspectorBackendDispatcher::CSSCommandHandler 69 , public InspectorBackendDispatcher::CSSCommandHandler
70 , public InspectorStyleSheet::Listener { 70 , public InspectorStyleSheet::Listener {
71 WTF_MAKE_NONCOPYABLE(InspectorCSSAgent); 71 WTF_MAKE_NONCOPYABLE(InspectorCSSAgent);
72 public: 72 public:
73 enum MediaListSource { 73 enum MediaListSource {
74 MediaListSourceLinkedSheet, 74 MediaListSourceLinkedSheet,
75 MediaListSourceInlineSheet, 75 MediaListSourceInlineSheet,
76 MediaListSourceMediaRule, 76 MediaListSourceMediaRule,
(...skipping 21 matching lines...) Expand all
98 private: 98 private:
99 ContentSecurityPolicy* m_contentSecurityPolicy; 99 ContentSecurityPolicy* m_contentSecurityPolicy;
100 }; 100 };
101 101
102 static CSSStyleRule* asCSSStyleRule(CSSRule*); 102 static CSSStyleRule* asCSSStyleRule(CSSRule*);
103 103
104 static PassOwnPtr<InspectorCSSAgent> create(InstrumentingAgents* instrumenti ngAgents, InspectorCompositeState* state, InspectorDOMAgent* domAgent, Inspector PageAgent* pageAgent, InspectorResourceAgent* resourceAgent) 104 static PassOwnPtr<InspectorCSSAgent> create(InstrumentingAgents* instrumenti ngAgents, InspectorCompositeState* state, InspectorDOMAgent* domAgent, Inspector PageAgent* pageAgent, InspectorResourceAgent* resourceAgent)
105 { 105 {
106 return adoptPtr(new InspectorCSSAgent(instrumentingAgents, state, domAge nt, pageAgent, resourceAgent)); 106 return adoptPtr(new InspectorCSSAgent(instrumentingAgents, state, domAge nt, pageAgent, resourceAgent));
107 } 107 }
108 ~InspectorCSSAgent(); 108 virtual ~InspectorCSSAgent();
109 109
110 bool forcePseudoState(Element*, CSSSelector::PseudoType); 110 bool forcePseudoState(Element*, CSSSelector::PseudoType);
111 virtual void setFrontend(InspectorFrontend*); 111 virtual void setFrontend(InspectorFrontend*) OVERRIDE;
112 virtual void clearFrontend(); 112 virtual void clearFrontend() OVERRIDE;
113 virtual void discardAgent(); 113 virtual void discardAgent() OVERRIDE;
114 virtual void restore(); 114 virtual void restore() OVERRIDE;
115 virtual void enable(ErrorString*, PassRefPtr<EnableCallback>); 115 virtual void enable(ErrorString*, PassRefPtr<EnableCallback>) OVERRIDE;
116 virtual void disable(ErrorString*); 116 virtual void disable(ErrorString*) OVERRIDE;
117 void reset(); 117 void reset();
118 void didCommitLoad(Frame*, DocumentLoader*); 118 void didCommitLoad(Frame*, DocumentLoader*);
119 void mediaQueryResultChanged(); 119 void mediaQueryResultChanged();
120 void didCreateNamedFlow(Document*, NamedFlow*); 120 void didCreateNamedFlow(Document*, NamedFlow*);
121 void willRemoveNamedFlow(Document*, NamedFlow*); 121 void willRemoveNamedFlow(Document*, NamedFlow*);
122 void willMutateRules(); 122 void willMutateRules();
123 void didMutateRules(CSSStyleSheet*); 123 void didMutateRules(CSSStyleSheet*);
124 void willMutateStyle(); 124 void willMutateStyle();
125 void didMutateStyle(CSSStyleDeclaration*, bool); 125 void didMutateStyle(CSSStyleDeclaration*, bool);
126 126
127 private: 127 private:
128 void regionLayoutUpdated(NamedFlow*, int documentNodeId); 128 void regionLayoutUpdated(NamedFlow*, int documentNodeId);
129 void regionOversetChanged(NamedFlow*, int documentNodeId); 129 void regionOversetChanged(NamedFlow*, int documentNodeId);
130 130
131 public: 131 public:
132 void didUpdateRegionLayout(Document*, NamedFlow*); 132 void didUpdateRegionLayout(Document*, NamedFlow*);
133 void didChangeRegionOverset(Document*, NamedFlow*); 133 void didChangeRegionOverset(Document*, NamedFlow*);
134 134
135 void activeStyleSheetsUpdated(Document*); 135 void activeStyleSheetsUpdated(Document*);
136 void frameDetachedFromParent(Frame*); 136 void frameDetachedFromParent(Frame*);
137 137
138 virtual void getComputedStyleForNode(ErrorString*, int nodeId, RefPtr<TypeBu ilder::Array<TypeBuilder::CSS::CSSComputedStyleProperty> >&); 138 virtual void getComputedStyleForNode(ErrorString*, int nodeId, RefPtr<TypeBu ilder::Array<TypeBuilder::CSS::CSSComputedStyleProperty> >&) OVERRIDE;
139 virtual void getPlatformFontsForNode(ErrorString*, int nodeId, String* cssFa milyName, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::PlatformFontUsage> >&); 139 virtual void getPlatformFontsForNode(ErrorString*, int nodeId, String* cssFa milyName, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::PlatformFontUsage> >&) OVE RRIDE;
140 virtual void getInlineStylesForNode(ErrorString*, int nodeId, RefPtr<TypeBui lder::CSS::CSSStyle>& inlineStyle, RefPtr<TypeBuilder::CSS::CSSStyle>& attribute s); 140 virtual void getInlineStylesForNode(ErrorString*, int nodeId, RefPtr<TypeBui lder::CSS::CSSStyle>& inlineStyle, RefPtr<TypeBuilder::CSS::CSSStyle>& attribute s) OVERRIDE;
141 virtual void getMatchedStylesForNode(ErrorString*, int nodeId, const bool* i ncludePseudo, const bool* includeInherited, RefPtr<TypeBuilder::Array<TypeBuilde r::CSS::RuleMatch> >& matchedCSSRules, RefPtr<TypeBuilder::Array<TypeBuilder::CS S::PseudoIdMatches> >& pseudoIdMatches, RefPtr<TypeBuilder::Array<TypeBuilder::C SS::InheritedStyleEntry> >& inheritedEntries); 141 virtual void getMatchedStylesForNode(ErrorString*, int nodeId, const bool* i ncludePseudo, const bool* includeInherited, RefPtr<TypeBuilder::Array<TypeBuilde r::CSS::RuleMatch> >& matchedCSSRules, RefPtr<TypeBuilder::Array<TypeBuilder::CS S::PseudoIdMatches> >&, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::InheritedSty leEntry> >& inheritedEntries) OVERRIDE;
142 virtual void getAllStyleSheets(ErrorString*, RefPtr<TypeBuilder::Array<TypeB uilder::CSS::CSSStyleSheetHeader> >& styleSheetInfos); 142 virtual void getAllStyleSheets(ErrorString*, RefPtr<TypeBuilder::Array<TypeB uilder::CSS::CSSStyleSheetHeader> >& styleSheetInfos) OVERRIDE;
143 virtual void getStyleSheet(ErrorString*, const String& styleSheetId, RefPtr< TypeBuilder::CSS::CSSStyleSheetBody>& result); 143 virtual void getStyleSheet(ErrorString*, const String& styleSheetId, RefPtr< TypeBuilder::CSS::CSSStyleSheetBody>& result) OVERRIDE;
144 virtual void getStyleSheetText(ErrorString*, const String& styleSheetId, Str ing* result); 144 virtual void getStyleSheetText(ErrorString*, const String& styleSheetId, Str ing* result) OVERRIDE;
145 virtual void setStyleSheetText(ErrorString*, const String& styleSheetId, con st String& text); 145 virtual void setStyleSheetText(ErrorString*, const String& styleSheetId, con st String& text) OVERRIDE;
146 virtual void setStyleText(ErrorString*, const RefPtr<JSONObject>& styleId, c onst String& text, RefPtr<TypeBuilder::CSS::CSSStyle>& result); 146 virtual void setStyleText(ErrorString*, const RefPtr<JSONObject>& styleId, c onst String& text, RefPtr<TypeBuilder::CSS::CSSStyle>& result) OVERRIDE;
147 virtual void setPropertyText(ErrorString*, const RefPtr<JSONObject>& styleId , int propertyIndex, const String& text, bool overwrite, RefPtr<TypeBuilder::CSS ::CSSStyle>& result); 147 virtual void setPropertyText(ErrorString*, const RefPtr<JSONObject>& styleId , int propertyIndex, const String& text, bool overwrite, RefPtr<TypeBuilder::CSS ::CSSStyle>& result) OVERRIDE;
148 virtual void toggleProperty(ErrorString*, const RefPtr<JSONObject>& styleId, int propertyIndex, bool disable, RefPtr<TypeBuilder::CSS::CSSStyle>& result); 148 virtual void toggleProperty(ErrorString*, const RefPtr<JSONObject>& styleId, int propertyIndex, bool disable, RefPtr<TypeBuilder::CSS::CSSStyle>& result) OV ERRIDE;
149 virtual void setRuleSelector(ErrorString*, const RefPtr<JSONObject>& ruleId, const String& selector, RefPtr<TypeBuilder::CSS::CSSRule>& result); 149 virtual void setRuleSelector(ErrorString*, const RefPtr<JSONObject>& ruleId, const String& selector, RefPtr<TypeBuilder::CSS::CSSRule>& result) OVERRIDE;
150 virtual void addRule(ErrorString*, int contextNodeId, const String& selector , RefPtr<TypeBuilder::CSS::CSSRule>& result); 150 virtual void addRule(ErrorString*, int contextNodeId, const String& selector , RefPtr<TypeBuilder::CSS::CSSRule>& result) OVERRIDE;
151 virtual void getSupportedCSSProperties(ErrorString*, RefPtr<TypeBuilder::Arr ay<TypeBuilder::CSS::CSSPropertyInfo> >& result); 151 virtual void getSupportedCSSProperties(ErrorString*, RefPtr<TypeBuilder::Arr ay<TypeBuilder::CSS::CSSPropertyInfo> >& result) OVERRIDE;
152 virtual void forcePseudoState(ErrorString*, int nodeId, const RefPtr<JSONArr ay>& forcedPseudoClasses); 152 virtual void forcePseudoState(ErrorString*, int nodeId, const RefPtr<JSONArr ay>& forcedPseudoClasses) OVERRIDE;
153 virtual void getNamedFlowCollection(ErrorString*, int documentNodeId, RefPtr <TypeBuilder::Array<TypeBuilder::CSS::NamedFlow> >& result); 153 virtual void getNamedFlowCollection(ErrorString*, int documentNodeId, RefPtr <TypeBuilder::Array<TypeBuilder::CSS::NamedFlow> >& result) OVERRIDE;
154 154
155 PassRefPtr<TypeBuilder::CSS::CSSMedia> buildMediaObject(const MediaList*, Me diaListSource, const String&, CSSStyleSheet*); 155 PassRefPtr<TypeBuilder::CSS::CSSMedia> buildMediaObject(const MediaList*, Me diaListSource, const String&, CSSStyleSheet*);
156 PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSMedia> > buildMediaListCh ain(CSSRule*); 156 PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSMedia> > buildMediaListCh ain(CSSRule*);
157 157
158 private: 158 private:
159 class StyleSheetAction; 159 class StyleSheetAction;
160 class SetStyleSheetTextAction; 160 class SetStyleSheetTextAction;
161 class SetStyleTextAction; 161 class SetStyleTextAction;
162 class SetPropertyTextAction; 162 class SetPropertyTextAction;
163 class TogglePropertyAction; 163 class TogglePropertyAction;
(...skipping 29 matching lines...) Expand all
193 bool styleSheetEditInProgress() const { return m_styleSheetsPendingMutation || m_styleDeclarationPendingMutation || m_isSettingStyleSheetText; } 193 bool styleSheetEditInProgress() const { return m_styleSheetsPendingMutation || m_styleDeclarationPendingMutation || m_isSettingStyleSheetText; }
194 194
195 PassRefPtr<TypeBuilder::CSS::CSSRule> buildObjectForRule(CSSStyleRule*); 195 PassRefPtr<TypeBuilder::CSS::CSSRule> buildObjectForRule(CSSStyleRule*);
196 PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSRule> > buildArrayForRule List(CSSRuleList*); 196 PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSRule> > buildArrayForRule List(CSSRuleList*);
197 PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::RuleMatch> > buildArrayForMa tchedRuleList(CSSRuleList*, Element*); 197 PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::RuleMatch> > buildArrayForMa tchedRuleList(CSSRuleList*, Element*);
198 PassRefPtr<TypeBuilder::CSS::CSSStyle> buildObjectForAttributesStyle(Element *); 198 PassRefPtr<TypeBuilder::CSS::CSSStyle> buildObjectForAttributesStyle(Element *);
199 PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::Region> > buildArrayForRegio ns(ErrorString*, PassRefPtr<NodeList>, int documentNodeId); 199 PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::Region> > buildArrayForRegio ns(ErrorString*, PassRefPtr<NodeList>, int documentNodeId);
200 PassRefPtr<TypeBuilder::CSS::NamedFlow> buildObjectForNamedFlow(ErrorString* , NamedFlow*, int documentNodeId); 200 PassRefPtr<TypeBuilder::CSS::NamedFlow> buildObjectForNamedFlow(ErrorString* , NamedFlow*, int documentNodeId);
201 201
202 // InspectorDOMAgent::DOMListener implementation 202 // InspectorDOMAgent::DOMListener implementation
203 virtual void didRemoveDocument(Document*); 203 virtual void didRemoveDocument(Document*) OVERRIDE;
204 virtual void didRemoveDOMNode(Node*); 204 virtual void didRemoveDOMNode(Node*) OVERRIDE;
205 virtual void didModifyDOMAttr(Element*); 205 virtual void didModifyDOMAttr(Element*) OVERRIDE;
206 206
207 // InspectorStyleSheet::Listener implementation 207 // InspectorStyleSheet::Listener implementation
208 virtual void styleSheetChanged(InspectorStyleSheet*) OVERRIDE; 208 virtual void styleSheetChanged(InspectorStyleSheet*) OVERRIDE;
209 virtual void willReparseStyleSheet() OVERRIDE; 209 virtual void willReparseStyleSheet() OVERRIDE;
210 virtual void didReparseStyleSheet() OVERRIDE; 210 virtual void didReparseStyleSheet() OVERRIDE;
211 211
212 void resetPseudoStates(); 212 void resetPseudoStates();
213 213
214 InspectorFrontend::CSS* m_frontend; 214 InspectorFrontend::CSS* m_frontend;
215 InspectorDOMAgent* m_domAgent; 215 InspectorDOMAgent* m_domAgent;
(...skipping 20 matching lines...) Expand all
236 friend class ChangeRegionOversetTask; 236 friend class ChangeRegionOversetTask;
237 friend class EnableResourceClient; 237 friend class EnableResourceClient;
238 friend class StyleSheetBinder; 238 friend class StyleSheetBinder;
239 friend class UpdateRegionLayoutTask; 239 friend class UpdateRegionLayoutTask;
240 }; 240 };
241 241
242 242
243 } // namespace WebCore 243 } // namespace WebCore
244 244
245 #endif // !defined(InspectorCSSAgent_h) 245 #endif // !defined(InspectorCSSAgent_h)
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorAgent.h ('k') | Source/core/inspector/InspectorConsoleAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698