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

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

Issue 2759703003: DevTools: add support for polling for coverage data in CSS agent (Closed)
Patch Set: moved ranges sorting so it also works for CSS ranges Created 3 years, 8 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
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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 bool forcePseudoState(Element*, CSSSelector::PseudoType); 113 bool forcePseudoState(Element*, CSSSelector::PseudoType);
114 void didCommitLoadForLocalFrame(LocalFrame*) override; 114 void didCommitLoadForLocalFrame(LocalFrame*) override;
115 void restore() override; 115 void restore() override;
116 void flushPendingProtocolNotifications() override; 116 void flushPendingProtocolNotifications() override;
117 void reset(); 117 void reset();
118 void mediaQueryResultChanged(); 118 void mediaQueryResultChanged();
119 119
120 void activeStyleSheetsUpdated(Document*); 120 void activeStyleSheetsUpdated(Document*);
121 void documentDetached(Document*); 121 void documentDetached(Document*);
122 void fontsUpdated(); 122 void fontsUpdated();
123 void getUnusedRules( 123 void setCoverageEnabled(bool);
124 std::unique_ptr<protocol::Array<protocol::CSS::RuleUsage>>*);
125 void setUsageTrackerStatus(bool enabled);
126 124
127 void enable(std::unique_ptr<EnableCallback>) override; 125 void enable(std::unique_ptr<EnableCallback>) override;
128 protocol::Response disable() override; 126 protocol::Response disable() override;
129 protocol::Response getMatchedStylesForNode( 127 protocol::Response getMatchedStylesForNode(
130 int nodeId, 128 int nodeId,
131 protocol::Maybe<protocol::CSS::CSSStyle>* inlineStyle, 129 protocol::Maybe<protocol::CSS::CSSStyle>* inlineStyle,
132 protocol::Maybe<protocol::CSS::CSSStyle>* attributesStyle, 130 protocol::Maybe<protocol::CSS::CSSStyle>* attributesStyle,
133 protocol::Maybe<protocol::Array<protocol::CSS::RuleMatch>>* 131 protocol::Maybe<protocol::Array<protocol::CSS::RuleMatch>>*
134 matchedCSSRules, 132 matchedCSSRules,
135 protocol::Maybe<protocol::Array<protocol::CSS::PseudoElementMatches>>*, 133 protocol::Maybe<protocol::Array<protocol::CSS::PseudoElementMatches>>*,
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 std::unique_ptr<protocol::Array<protocol::CSS::CSSMedia>>*) override; 188 std::unique_ptr<protocol::Array<protocol::CSS::CSSMedia>>*) override;
191 protocol::Response setEffectivePropertyValueForNode( 189 protocol::Response setEffectivePropertyValueForNode(
192 int nodeId, 190 int nodeId,
193 const String& propertyName, 191 const String& propertyName,
194 const String& value) override; 192 const String& value) override;
195 protocol::Response getBackgroundColors( 193 protocol::Response getBackgroundColors(
196 int nodeId, 194 int nodeId,
197 protocol::Maybe<protocol::Array<String>>* backgroundColors) override; 195 protocol::Maybe<protocol::Array<String>>* backgroundColors) override;
198 196
199 protocol::Response startRuleUsageTracking() override; 197 protocol::Response startRuleUsageTracking() override;
200 198 protocol::Response takeCoverageDelta(
199 std::unique_ptr<protocol::Array<protocol::CSS::RuleUsage>>* result)
200 override;
201 protocol::Response stopRuleUsageTracking( 201 protocol::Response stopRuleUsageTracking(
202 std::unique_ptr<protocol::Array<protocol::CSS::RuleUsage>>* result) 202 std::unique_ptr<protocol::Array<protocol::CSS::RuleUsage>>* result)
203 override; 203 override;
204 204
205 void collectMediaQueriesFromRule(CSSRule*, 205 void collectMediaQueriesFromRule(CSSRule*,
206 protocol::Array<protocol::CSS::CSSMedia>*); 206 protocol::Array<protocol::CSS::CSSMedia>*);
207 void collectMediaQueriesFromStyleSheet( 207 void collectMediaQueriesFromStyleSheet(
208 CSSStyleSheet*, 208 CSSStyleSheet*,
209 protocol::Array<protocol::CSS::CSSMedia>*); 209 protocol::Array<protocol::CSS::CSSMedia>*);
210 std::unique_ptr<protocol::CSS::CSSMedia> buildMediaObject(const MediaList*, 210 std::unique_ptr<protocol::CSS::CSSMedia> buildMediaObject(const MediaList*,
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 InspectorStyleSheet* inspectorStyleSheetForRule(CSSStyleRule*); 280 InspectorStyleSheet* inspectorStyleSheetForRule(CSSStyleRule*);
281 281
282 InspectorStyleSheet* viaInspectorStyleSheet(Document*); 282 InspectorStyleSheet* viaInspectorStyleSheet(Document*);
283 protocol::Response assertInspectorStyleSheetForId(const String&, 283 protocol::Response assertInspectorStyleSheetForId(const String&,
284 InspectorStyleSheet*&); 284 InspectorStyleSheet*&);
285 protocol::Response assertStyleSheetForId(const String&, 285 protocol::Response assertStyleSheetForId(const String&,
286 InspectorStyleSheetBase*&); 286 InspectorStyleSheetBase*&);
287 String detectOrigin(CSSStyleSheet* pageStyleSheet, Document* ownerDocument); 287 String detectOrigin(CSSStyleSheet* pageStyleSheet, Document* ownerDocument);
288 288
289 std::unique_ptr<protocol::CSS::CSSRule> buildObjectForRule(CSSStyleRule*); 289 std::unique_ptr<protocol::CSS::CSSRule> buildObjectForRule(CSSStyleRule*);
290 std::unique_ptr<protocol::CSS::RuleUsage> buildObjectForRuleUsage( 290 std::unique_ptr<protocol::CSS::RuleUsage> buildCoverageInfo(CSSStyleRule*,
291 CSSStyleRule*, 291 bool);
292 bool);
293 std::unique_ptr<protocol::Array<protocol::CSS::RuleMatch>> 292 std::unique_ptr<protocol::Array<protocol::CSS::RuleMatch>>
294 buildArrayForMatchedRuleList(CSSRuleList*, Element*, PseudoId); 293 buildArrayForMatchedRuleList(CSSRuleList*, Element*, PseudoId);
295 std::unique_ptr<protocol::CSS::CSSStyle> buildObjectForAttributesStyle( 294 std::unique_ptr<protocol::CSS::CSSStyle> buildObjectForAttributesStyle(
296 Element*); 295 Element*);
297 296
298 // InspectorDOMAgent::DOMListener implementation 297 // InspectorDOMAgent::DOMListener implementation
299 void didAddDocument(Document*) override; 298 void didAddDocument(Document*) override;
300 void didRemoveDocument(Document*) override; 299 void didRemoveDocument(Document*) override;
301 void didRemoveDOMNode(Node*) override; 300 void didRemoveDOMNode(Node*) override;
302 void didModifyDOMAttr(Element*) override; 301 void didModifyDOMAttr(Element*) override;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 351
353 int m_resourceContentLoaderClientId; 352 int m_resourceContentLoaderClientId;
354 353
355 friend class InspectorResourceContentLoaderCallback; 354 friend class InspectorResourceContentLoaderCallback;
356 friend class StyleSheetBinder; 355 friend class StyleSheetBinder;
357 }; 356 };
358 357
359 } // namespace blink 358 } // namespace blink
360 359
361 #endif // !defined(InspectorCSSAgent_h) 360 #endif // !defined(InspectorCSSAgent_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698