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

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

Issue 16745003: DevTools: Move CSS.CSSMedia construction into InspectorCSSAgent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Get rid of the ISS->ICSSAgent dependency Created 7 years, 6 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 | « no previous file | Source/core/inspector/InspectorCSSAgent.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 /* 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 class CSSRuleList; 47 class CSSRuleList;
48 class CSSStyleDeclaration; 48 class CSSStyleDeclaration;
49 class CSSStyleRule; 49 class CSSStyleRule;
50 class CSSStyleSheet; 50 class CSSStyleSheet;
51 class Document; 51 class Document;
52 class DocumentStyleSheetCollection; 52 class DocumentStyleSheetCollection;
53 class Element; 53 class Element;
54 class InspectorCSSOMWrappers; 54 class InspectorCSSOMWrappers;
55 class InspectorFrontend; 55 class InspectorFrontend;
56 class InstrumentingAgents; 56 class InstrumentingAgents;
57 class MediaList;
57 class NameNodeMap; 58 class NameNodeMap;
58 class Node; 59 class Node;
59 class NodeList; 60 class NodeList;
60 class SelectorProfile; 61 class SelectorProfile;
61 class StyleResolver; 62 class StyleResolver;
62 class StyleRule; 63 class StyleRule;
63 class StyleSheetVisitor; 64 class StyleSheetVisitor;
64 class UpdateRegionLayoutTask; 65 class UpdateRegionLayoutTask;
65 66
66 typedef HashMap<CSSStyleSheet*, RefPtr<InspectorStyleSheet> > CSSStyleSheetToIns pectorStyleSheet; 67 typedef HashMap<CSSStyleSheet*, RefPtr<InspectorStyleSheet> > CSSStyleSheetToIns pectorStyleSheet;
67 68
68 class InspectorCSSAgent 69 class InspectorCSSAgent
69 : public InspectorBaseAgent<InspectorCSSAgent> 70 : public InspectorBaseAgent<InspectorCSSAgent>
70 , public InspectorDOMAgent::DOMListener 71 , public InspectorDOMAgent::DOMListener
71 , public InspectorBackendDispatcher::CSSCommandHandler 72 , public InspectorBackendDispatcher::CSSCommandHandler
72 , public InspectorStyleSheet::Listener { 73 , public InspectorStyleSheet::Listener {
73 WTF_MAKE_NONCOPYABLE(InspectorCSSAgent); 74 WTF_MAKE_NONCOPYABLE(InspectorCSSAgent);
74 public: 75 public:
76 enum MediaListSource {
77 MediaListSourceLinkedSheet,
78 MediaListSourceInlineSheet,
79 MediaListSourceMediaRule,
80 MediaListSourceImportRule
81 };
82
75 class InlineStyleOverrideScope { 83 class InlineStyleOverrideScope {
76 public: 84 public:
77 InlineStyleOverrideScope(SecurityContext* context) 85 InlineStyleOverrideScope(SecurityContext* context)
78 : m_contentSecurityPolicy(context->contentSecurityPolicy()) 86 : m_contentSecurityPolicy(context->contentSecurityPolicy())
79 { 87 {
80 m_contentSecurityPolicy->setOverrideAllowInlineStyle(true); 88 m_contentSecurityPolicy->setOverrideAllowInlineStyle(true);
81 } 89 }
82 90
83 ~InlineStyleOverrideScope() 91 ~InlineStyleOverrideScope()
84 { 92 {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 virtual void getNamedFlowCollection(ErrorString*, int documentNodeId, RefPtr <TypeBuilder::Array<TypeBuilder::CSS::NamedFlow> >& result); 140 virtual void getNamedFlowCollection(ErrorString*, int documentNodeId, RefPtr <TypeBuilder::Array<TypeBuilder::CSS::NamedFlow> >& result);
133 141
134 virtual void startSelectorProfiler(ErrorString*); 142 virtual void startSelectorProfiler(ErrorString*);
135 virtual void stopSelectorProfiler(ErrorString*, RefPtr<TypeBuilder::CSS::Sel ectorProfile>&); 143 virtual void stopSelectorProfiler(ErrorString*, RefPtr<TypeBuilder::CSS::Sel ectorProfile>&);
136 144
137 PassRefPtr<TypeBuilder::CSS::SelectorProfile> stopSelectorProfilerImpl(Error String*, bool needProfile); 145 PassRefPtr<TypeBuilder::CSS::SelectorProfile> stopSelectorProfilerImpl(Error String*, bool needProfile);
138 void willMatchRule(StyleRule*, InspectorCSSOMWrappers&, DocumentStyleSheetCo llection*); 146 void willMatchRule(StyleRule*, InspectorCSSOMWrappers&, DocumentStyleSheetCo llection*);
139 void didMatchRule(bool); 147 void didMatchRule(bool);
140 void willProcessRule(StyleRule*, StyleResolver*); 148 void willProcessRule(StyleRule*, StyleResolver*);
141 void didProcessRule(); 149 void didProcessRule();
150 PassRefPtr<TypeBuilder::CSS::CSSMedia> buildMediaObject(const MediaList*, Me diaListSource, const String&);
151 PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSMedia> > buildMediaListCh ain(CSSRule*);
142 152
143 private: 153 private:
144 class StyleSheetAction; 154 class StyleSheetAction;
145 class SetStyleSheetTextAction; 155 class SetStyleSheetTextAction;
146 class SetStyleTextAction; 156 class SetStyleTextAction;
147 class SetPropertyTextAction; 157 class SetPropertyTextAction;
148 class TogglePropertyAction; 158 class TogglePropertyAction;
149 class SetRuleSelectorAction; 159 class SetRuleSelectorAction;
150 class AddRuleAction; 160 class AddRuleAction;
151 161
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 213
204 OwnPtr<SelectorProfile> m_currentSelectorProfile; 214 OwnPtr<SelectorProfile> m_currentSelectorProfile;
205 215
206 friend class StyleSheetBinder; 216 friend class StyleSheetBinder;
207 }; 217 };
208 218
209 219
210 } // namespace WebCore 220 } // namespace WebCore
211 221
212 #endif // !defined(InspectorCSSAgent_h) 222 #endif // !defined(InspectorCSSAgent_h)
OLDNEW
« no previous file with comments | « no previous file | Source/core/inspector/InspectorCSSAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698