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

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

Issue 172593003: DevTools: [CSS] Add CSS.editRangeInStyleSheetText() to the protocol (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix glitch Created 6 years, 9 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
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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 public: 121 public:
122 void activeStyleSheetsUpdated(Document*); 122 void activeStyleSheetsUpdated(Document*);
123 void frameDetachedFromParent(LocalFrame*); 123 void frameDetachedFromParent(LocalFrame*);
124 124
125 virtual void getComputedStyleForNode(ErrorString*, int nodeId, RefPtr<TypeBu ilder::Array<TypeBuilder::CSS::CSSComputedStyleProperty> >&) OVERRIDE; 125 virtual void getComputedStyleForNode(ErrorString*, int nodeId, RefPtr<TypeBu ilder::Array<TypeBuilder::CSS::CSSComputedStyleProperty> >&) OVERRIDE;
126 virtual void getPlatformFontsForNode(ErrorString*, int nodeId, String* cssFa milyName, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::PlatformFontUsage> >&) OVE RRIDE; 126 virtual void getPlatformFontsForNode(ErrorString*, int nodeId, String* cssFa milyName, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::PlatformFontUsage> >&) OVE RRIDE;
127 virtual void getInlineStylesForNode(ErrorString*, int nodeId, RefPtr<TypeBui lder::CSS::CSSStyle>& inlineStyle, RefPtr<TypeBuilder::CSS::CSSStyle>& attribute s) OVERRIDE; 127 virtual void getInlineStylesForNode(ErrorString*, int nodeId, RefPtr<TypeBui lder::CSS::CSSStyle>& inlineStyle, RefPtr<TypeBuilder::CSS::CSSStyle>& attribute s) OVERRIDE;
128 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; 128 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;
129 virtual void getStyleSheetText(ErrorString*, const String& styleSheetId, Str ing* result) OVERRIDE; 129 virtual void getStyleSheetText(ErrorString*, const String& styleSheetId, Str ing* result) OVERRIDE;
130 virtual void setStyleSheetText(ErrorString*, const String& styleSheetId, con st String& text) OVERRIDE; 130 virtual void setStyleSheetText(ErrorString*, const String& styleSheetId, con st String& text) OVERRIDE;
131 virtual void editRangeInStyleSheetText(ErrorString*, const String& styleShee tId, const RefPtr<JSONObject>& range, const String& text, RefPtr<TypeBuilder::CS S::CSSRule>&, RefPtr<TypeBuilder::CSS::CSSStyle>&) OVERRIDE;
131 virtual void setPropertyText(ErrorString*, const RefPtr<JSONObject>& styleId , int propertyIndex, const String& text, bool overwrite, RefPtr<TypeBuilder::CSS ::CSSStyle>& result) OVERRIDE; 132 virtual void setPropertyText(ErrorString*, const RefPtr<JSONObject>& styleId , int propertyIndex, const String& text, bool overwrite, RefPtr<TypeBuilder::CSS ::CSSStyle>& result) OVERRIDE;
132 virtual void setRuleSelector(ErrorString*, const RefPtr<JSONObject>& ruleId, const String& selector, RefPtr<TypeBuilder::CSS::CSSRule>& result) OVERRIDE; 133 virtual void setRuleSelector(ErrorString*, const RefPtr<JSONObject>& ruleId, const String& selector, RefPtr<TypeBuilder::CSS::CSSRule>& result) OVERRIDE;
133 virtual void createStyleSheet(ErrorString*, const String& frameId, TypeBuild er::CSS::StyleSheetId* outStyleSheetId) OVERRIDE; 134 virtual void createStyleSheet(ErrorString*, const String& frameId, TypeBuild er::CSS::StyleSheetId* outStyleSheetId) OVERRIDE;
134 virtual void addRule(ErrorString*, const String& styleSheetId, const String& selector, RefPtr<TypeBuilder::CSS::CSSRule>& result) OVERRIDE; 135 virtual void addRule(ErrorString*, const String& styleSheetId, const String& selector, RefPtr<TypeBuilder::CSS::CSSRule>& result) OVERRIDE;
135 virtual void forcePseudoState(ErrorString*, int nodeId, const RefPtr<JSONArr ay>& forcedPseudoClasses) OVERRIDE; 136 virtual void forcePseudoState(ErrorString*, int nodeId, const RefPtr<JSONArr ay>& forcedPseudoClasses) OVERRIDE;
136 137
137 PassRefPtr<TypeBuilder::CSS::CSSMedia> buildMediaObject(const MediaList*, Me diaListSource, const String&, CSSStyleSheet*); 138 PassRefPtr<TypeBuilder::CSS::CSSMedia> buildMediaObject(const MediaList*, Me diaListSource, const String&, CSSStyleSheet*);
138 PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSMedia> > buildMediaListCh ain(CSSRule*); 139 PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSMedia> > buildMediaListCh ain(CSSRule*);
139 140
140 private: 141 private:
141 class StyleSheetAction; 142 class StyleSheetAction;
142 class SetStyleSheetTextAction; 143 class SetStyleSheetTextAction;
144 class EditRangeInStyleSheetTextAction;
143 class SetPropertyTextAction; 145 class SetPropertyTextAction;
144 class SetRuleSelectorAction; 146 class SetRuleSelectorAction;
145 class AddRuleAction; 147 class AddRuleAction;
146 class EnableResourceClient; 148 class EnableResourceClient;
147 149
148 InspectorCSSAgent(InspectorDOMAgent*, InspectorPageAgent*, InspectorResource Agent*); 150 InspectorCSSAgent(InspectorDOMAgent*, InspectorPageAgent*, InspectorResource Agent*);
149 151
150 typedef HashMap<String, RefPtr<InspectorStyleSheet> > IdToInspectorStyleShee t; 152 typedef HashMap<String, RefPtr<InspectorStyleSheet> > IdToInspectorStyleShee t;
151 typedef HashMap<Node*, RefPtr<InspectorStyleSheetForInlineStyle> > NodeToIns pectorStyleSheet; // bogus "stylesheets" with elements' inline styles 153 typedef HashMap<Node*, RefPtr<InspectorStyleSheetForInlineStyle> > NodeToIns pectorStyleSheet; // bogus "stylesheets" with elements' inline styles
152 typedef HashMap<int, unsigned> NodeIdToForcedPseudoState; 154 typedef HashMap<int, unsigned> NodeIdToForcedPseudoState;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 bool m_isSettingStyleSheetText; 211 bool m_isSettingStyleSheetText;
210 212
211 friend class EnableResourceClient; 213 friend class EnableResourceClient;
212 friend class StyleSheetBinder; 214 friend class StyleSheetBinder;
213 }; 215 };
214 216
215 217
216 } // namespace WebCore 218 } // namespace WebCore
217 219
218 #endif // !defined(InspectorCSSAgent_h) 220 #endif // !defined(InspectorCSSAgent_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698