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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorCSSAgent.h

Issue 2455943003: Backend for css rule tracking (Closed)
Patch Set: Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/inspector/InspectorCSSAgent.h
diff --git a/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.h b/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.h
index caf1477186dd15ce7883a29d289ffa05fbdef359..0537f9740f25b7bbb40ccb9b20f9e97c28797d64 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.h
+++ b/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.h
@@ -28,6 +28,7 @@
#include "core/CoreExport.h"
#include "core/css/CSSSelector.h"
+#include "core/css/resolver/StyleRuleUsageTracker.h"
caseq 2016/10/27 20:59:55 forward declare instead?
valih 2016/10/27 21:41:17 Done.
#include "core/dom/SecurityContext.h"
#include "core/frame/csp/ContentSecurityPolicy.h"
#include "core/inspector/InspectorBaseAgent.h"
@@ -123,8 +124,12 @@ class CORE_EXPORT InspectorCSSAgent final
void mediaQueryResultChanged();
void activeStyleSheetsUpdated(Document*);
+ void didCommitLoad(LocalFrame*, DocumentLoader*);
void documentDetached(Document*);
void fontsUpdated();
+ void getUnusedRules(
+ std::unique_ptr<protocol::Array<protocol::CSS::CSSRule>>*);
+ void setTrackerStatus(bool enable);
void enable(std::unique_ptr<EnableCallback>) override;
void disable(ErrorString*) override;
@@ -209,6 +214,12 @@ class CORE_EXPORT InspectorCSSAgent final
int nodeId,
Maybe<protocol::Array<String>>* backgroundColors) override;
+ void setSelectorRecording(ErrorString*, bool enable) override;
+
+ void getRuleList(ErrorString*,
+ std::unique_ptr<protocol::Array<protocol::CSS::CSSRule>>*
+ result) override;
+
void collectMediaQueriesFromRule(CSSRule*,
protocol::Array<protocol::CSS::CSSMedia>*);
void collectMediaQueriesFromStyleSheet(
@@ -304,6 +315,9 @@ class CORE_EXPORT InspectorCSSAgent final
String detectOrigin(CSSStyleSheet* pageStyleSheet, Document* ownerDocument);
std::unique_ptr<protocol::CSS::CSSRule> buildObjectForRule(CSSStyleRule*);
+ std::unique_ptr<protocol::CSS::CSSRule> buildObjectForRuleWithStatus(
+ CSSStyleRule*,
+ bool);
std::unique_ptr<protocol::Array<protocol::CSS::RuleMatch>>
buildArrayForMatchedRuleList(CSSRuleList*, Element*, PseudoId);
std::unique_ptr<protocol::CSS::CSSStyle> buildObjectForAttributesStyle(
@@ -357,6 +371,8 @@ class CORE_EXPORT InspectorCSSAgent final
NodeToInspectorStyleSheet m_nodeToInspectorStyleSheet;
NodeIdToForcedPseudoState m_nodeIdToForcedPseudoState;
+ Member<StyleRuleUsageTracker> m_tracker;
+
Member<CSSStyleSheet> m_inspectorUserAgentStyleSheet;
int m_resourceContentLoaderClientId;

Powered by Google App Engine
This is Rietveld 408576698