 Chromium Code Reviews
 Chromium Code Reviews Issue 638553002:
  Replace FINAL and OVERRIDE with their C++11 counterparts in Source/core/inspector  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master
    
  
    Issue 638553002:
  Replace FINAL and OVERRIDE with their C++11 counterparts in Source/core/inspector  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master| OLD | NEW | 
|---|---|
| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 51 class Element; | 51 class Element; | 
| 52 class InspectorFrontend; | 52 class InspectorFrontend; | 
| 53 class InspectorResourceAgent; | 53 class InspectorResourceAgent; | 
| 54 class InstrumentingAgents; | 54 class InstrumentingAgents; | 
| 55 class MediaList; | 55 class MediaList; | 
| 56 class Node; | 56 class Node; | 
| 57 class PlatformFontUsage; | 57 class PlatformFontUsage; | 
| 58 class RenderText; | 58 class RenderText; | 
| 59 class StyleResolver; | 59 class StyleResolver; | 
| 60 | 60 | 
| 61 class InspectorCSSAgent FINAL | 61 class InspectorCSSAgent final | 
| 62 : public InspectorBaseAgent<InspectorCSSAgent> | 62 : public InspectorBaseAgent<InspectorCSSAgent> | 
| 63 , public InspectorDOMAgent::DOMListener | 63 , public InspectorDOMAgent::DOMListener | 
| 64 , public InspectorBackendDispatcher::CSSCommandHandler | 64 , public InspectorBackendDispatcher::CSSCommandHandler | 
| 65 , public InspectorStyleSheetBase::Listener { | 65 , public InspectorStyleSheetBase::Listener { | 
| 66 WTF_MAKE_NONCOPYABLE(InspectorCSSAgent); | 66 WTF_MAKE_NONCOPYABLE(InspectorCSSAgent); | 
| 67 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(InspectorCSSAgent); | 67 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(InspectorCSSAgent); | 
| 68 public: | 68 public: | 
| 69 enum MediaListSource { | 69 enum MediaListSource { | 
| 70 MediaListSourceLinkedSheet, | 70 MediaListSourceLinkedSheet, | 
| 71 MediaListSourceInlineSheet, | 71 MediaListSourceInlineSheet, | 
| (...skipping 26 matching lines...) Expand all Loading... | |
| 98 static CSSStyleRule* asCSSStyleRule(CSSRule*); | 98 static CSSStyleRule* asCSSStyleRule(CSSRule*); | 
| 99 | 99 | 
| 100 static PassOwnPtrWillBeRawPtr<InspectorCSSAgent> create(InspectorDOMAgent* d omAgent, InspectorPageAgent* pageAgent, InspectorResourceAgent* resourceAgent) | 100 static PassOwnPtrWillBeRawPtr<InspectorCSSAgent> create(InspectorDOMAgent* d omAgent, InspectorPageAgent* pageAgent, InspectorResourceAgent* resourceAgent) | 
| 101 { | 101 { | 
| 102 return adoptPtrWillBeNoop(new InspectorCSSAgent(domAgent, pageAgent, res ourceAgent)); | 102 return adoptPtrWillBeNoop(new InspectorCSSAgent(domAgent, pageAgent, res ourceAgent)); | 
| 103 } | 103 } | 
| 104 | 104 | 
| 105 static void collectAllDocumentStyleSheets(Document*, WillBeHeapVector<RawPtr WillBeMember<CSSStyleSheet> >&); | 105 static void collectAllDocumentStyleSheets(Document*, WillBeHeapVector<RawPtr WillBeMember<CSSStyleSheet> >&); | 
| 106 | 106 | 
| 107 virtual ~InspectorCSSAgent(); | 107 virtual ~InspectorCSSAgent(); | 
| 108 virtual void trace(Visitor*) OVERRIDE; | 108 virtual void trace(Visitor*) override; | 
| 109 | 109 | 
| 110 bool forcePseudoState(Element*, CSSSelector::PseudoType); | 110 bool forcePseudoState(Element*, CSSSelector::PseudoType); | 
| 111 virtual void setFrontend(InspectorFrontend*) OVERRIDE; | 111 virtual void setFrontend(InspectorFrontend*) override; | 
| 112 virtual void clearFrontend() OVERRIDE; | 112 virtual void clearFrontend() override; | 
| 113 virtual void discardAgent() OVERRIDE; | 113 virtual void discardAgent() override; | 
| 114 virtual void didCommitLoadForMainFrame() OVERRIDE; | 114 virtual void didCommitLoadForMainFrame() override; | 
| 115 virtual void restore() OVERRIDE; | 115 virtual void restore() override; | 
| 116 virtual void flushPendingFrontendMessages() OVERRIDE; | 116 virtual void flushPendingFrontendMessages() override; | 
| 117 virtual void enable(ErrorString*, PassRefPtrWillBeRawPtr<EnableCallback>) OV ERRIDE; | 117 virtual void enable(ErrorString*, PassRefPtrWillBeRawPtr<EnableCallback>) ov erride; | 
| 118 virtual void disable(ErrorString*) OVERRIDE; | 118 virtual void disable(ErrorString*) override; | 
| 119 void reset(); | 119 void reset(); | 
| 120 void mediaQueryResultChanged(); | 120 void mediaQueryResultChanged(); | 
| 121 void willMutateRules(); | 121 void willMutateRules(); | 
| 122 void didMutateRules(CSSStyleSheet*); | 122 void didMutateRules(CSSStyleSheet*); | 
| 123 void willMutateStyle(); | 123 void willMutateStyle(); | 
| 124 void didMutateStyle(CSSStyleDeclaration*, bool); | 124 void didMutateStyle(CSSStyleDeclaration*, bool); | 
| 125 | 125 | 
| 126 void activeStyleSheetsUpdated(Document*); | 126 void activeStyleSheetsUpdated(Document*); | 
| 127 void documentDetached(Document*); | 127 void documentDetached(Document*); | 
| 128 | 128 | 
| 129 virtual void getComputedStyleForNode(ErrorString*, int nodeId, RefPtr<TypeBu ilder::Array<TypeBuilder::CSS::CSSComputedStyleProperty> >&) OVERRIDE; | 129 virtual void getComputedStyleForNode(ErrorString*, int nodeId, RefPtr<TypeBu ilder::Array<TypeBuilder::CSS::CSSComputedStyleProperty> >&) override; | 
| 130 virtual void getPlatformFontsForNode(ErrorString*, int nodeId, String* cssFa milyName, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::PlatformFontUsage> >&) OVE RRIDE; | 130 virtual void getPlatformFontsForNode(ErrorString*, int nodeId, String* cssFa milyName, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::PlatformFontUsage> >&) ove rride; | 
| 131 virtual void getInlineStylesForNode(ErrorString*, int nodeId, RefPtr<TypeBui lder::CSS::CSSStyle>& inlineStyle, RefPtr<TypeBuilder::CSS::CSSStyle>& attribute s) OVERRIDE; | 131 virtual void getInlineStylesForNode(ErrorString*, int nodeId, RefPtr<TypeBui lder::CSS::CSSStyle>& inlineStyle, RefPtr<TypeBuilder::CSS::CSSStyle>& attribute s) override; | 
| 132 virtual void getMatchedStylesForNode(ErrorString*, int nodeId, const bool* e xcludePseudo, const bool* excludeInherited, RefPtr<TypeBuilder::Array<TypeBuilde r::CSS::RuleMatch> >& matchedCSSRules, RefPtr<TypeBuilder::Array<TypeBuilder::CS S::PseudoIdMatches> >&, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::InheritedSty leEntry> >& inheritedEntries) OVERRIDE; | 132 virtual void getMatchedStylesForNode(ErrorString*, int nodeId, const bool* e xcludePseudo, const bool* excludeInherited, RefPtr<TypeBuilder::Array<TypeBuilde r::CSS::RuleMatch> >& matchedCSSRules, RefPtr<TypeBuilder::Array<TypeBuilder::CS S::PseudoIdMatches> >&, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::InheritedSty leEntry> >& inheritedEntries) override; | 
| 133 virtual void getStyleSheetText(ErrorString*, const String& styleSheetId, Str ing* result) OVERRIDE; | 133 virtual void getStyleSheetText(ErrorString*, const String& styleSheetId, Str ing* result) override; | 
| 134 virtual void setStyleSheetText(ErrorString*, const String& styleSheetId, con st String& text) OVERRIDE; | 134 virtual void setStyleSheetText(ErrorString*, const String& styleSheetId, con st String& text) override; | 
| 
Mike West
2014/10/07 13:37:15
Nit: Trailing whitespace?
 
MRV
2014/10/07 13:59:48
Done.
 | |
| 135 | 135 | 
| 136 virtual void setPropertyText(ErrorString*, const String& styleSheetId, const RefPtr<JSONObject>& range, const String& text, RefPtr<TypeBuilder::CSS::CSSStyl e>& result) OVERRIDE; | 136 virtual void setPropertyText(ErrorString*, const String& styleSheetId, const RefPtr<JSONObject>& range, const String& text, RefPtr<TypeBuilder::CSS::CSSStyl e>& result) override; | 
| 137 virtual void setRuleSelector(ErrorString*, const String& styleSheetId, const RefPtr<JSONObject>& range, const String& selector, RefPtr<TypeBuilder::CSS::CSS Rule>& result) OVERRIDE; | 137 virtual void setRuleSelector(ErrorString*, const String& styleSheetId, const RefPtr<JSONObject>& range, const String& selector, RefPtr<TypeBuilder::CSS::CSS Rule>& result) override; | 
| 138 virtual void createStyleSheet(ErrorString*, const String& frameId, TypeBuild er::CSS::StyleSheetId* outStyleSheetId) OVERRIDE; | 138 virtual void createStyleSheet(ErrorString*, const String& frameId, TypeBuild er::CSS::StyleSheetId* outStyleSheetId) override; | 
| 139 virtual void addRule(ErrorString*, const String& styleSheetId, const String& ruleText, const RefPtr<JSONObject>& location, RefPtr<TypeBuilder::CSS::CSSRule> & result) OVERRIDE; | 139 virtual void addRule(ErrorString*, const String& styleSheetId, const String& ruleText, const RefPtr<JSONObject>& location, RefPtr<TypeBuilder::CSS::CSSRule> & result) override; | 
| 140 virtual void forcePseudoState(ErrorString*, int nodeId, const RefPtr<JSONArr ay>& forcedPseudoClasses) OVERRIDE; | 140 virtual void forcePseudoState(ErrorString*, int nodeId, const RefPtr<JSONArr ay>& forcedPseudoClasses) override; | 
| 141 virtual void getMediaQueries(ErrorString*, RefPtr<TypeBuilder::Array<TypeBui lder::CSS::CSSMedia> >& medias) OVERRIDE; | 141 virtual void getMediaQueries(ErrorString*, RefPtr<TypeBuilder::Array<TypeBui lder::CSS::CSSMedia> >& medias) override; | 
| 
Mike West
2014/10/07 13:37:15
Nit: Trailing whitespace?
 
MRV
2014/10/07 13:59:48
Done.
 | |
| 142 | 142 | 
| 143 bool collectMediaQueriesFromRule(CSSRule*, TypeBuilder::Array<TypeBuilder::C SS::CSSMedia>* mediaArray); | 143 bool collectMediaQueriesFromRule(CSSRule*, TypeBuilder::Array<TypeBuilder::C SS::CSSMedia>* mediaArray); | 
| 144 bool collectMediaQueriesFromStyleSheet(CSSStyleSheet*, TypeBuilder::Array<Ty peBuilder::CSS::CSSMedia>* mediaArray); | 144 bool collectMediaQueriesFromStyleSheet(CSSStyleSheet*, TypeBuilder::Array<Ty peBuilder::CSS::CSSMedia>* mediaArray); | 
| 145 PassRefPtr<TypeBuilder::CSS::CSSMedia> buildMediaObject(const MediaList*, Me diaListSource, const String&, CSSStyleSheet*); | 145 PassRefPtr<TypeBuilder::CSS::CSSMedia> buildMediaObject(const MediaList*, Me diaListSource, const String&, CSSStyleSheet*); | 
| 146 PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSMedia> > buildMediaListCh ain(CSSRule*); | 146 PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSMedia> > buildMediaListCh ain(CSSRule*); | 
| 147 | 147 | 
| 148 private: | 148 private: | 
| 149 class StyleSheetAction; | 149 class StyleSheetAction; | 
| 150 class SetStyleSheetTextAction; | 150 class SetStyleSheetTextAction; | 
| 151 class SetPropertyTextAction; | 151 class SetPropertyTextAction; | 
| (...skipping 26 matching lines...) Expand all Loading... | |
| 178 InspectorStyleSheet* assertInspectorStyleSheetForId(ErrorString*, const Stri ng&); | 178 InspectorStyleSheet* assertInspectorStyleSheetForId(ErrorString*, const Stri ng&); | 
| 179 InspectorStyleSheetBase* assertStyleSheetForId(ErrorString*, const String&); | 179 InspectorStyleSheetBase* assertStyleSheetForId(ErrorString*, const String&); | 
| 180 TypeBuilder::CSS::StyleSheetOrigin::Enum detectOrigin(CSSStyleSheet* pageSty leSheet, Document* ownerDocument); | 180 TypeBuilder::CSS::StyleSheetOrigin::Enum detectOrigin(CSSStyleSheet* pageSty leSheet, Document* ownerDocument); | 
| 181 bool styleSheetEditInProgress() const { return m_styleSheetsPendingMutation || m_styleDeclarationPendingMutation || m_isSettingStyleSheetText; } | 181 bool styleSheetEditInProgress() const { return m_styleSheetsPendingMutation || m_styleDeclarationPendingMutation || m_isSettingStyleSheetText; } | 
| 182 | 182 | 
| 183 PassRefPtr<TypeBuilder::CSS::CSSRule> buildObjectForRule(CSSStyleRule*); | 183 PassRefPtr<TypeBuilder::CSS::CSSRule> buildObjectForRule(CSSStyleRule*); | 
| 184 PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::RuleMatch> > buildArrayForMa tchedRuleList(CSSRuleList*, Element*); | 184 PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::RuleMatch> > buildArrayForMa tchedRuleList(CSSRuleList*, Element*); | 
| 185 PassRefPtr<TypeBuilder::CSS::CSSStyle> buildObjectForAttributesStyle(Element *); | 185 PassRefPtr<TypeBuilder::CSS::CSSStyle> buildObjectForAttributesStyle(Element *); | 
| 186 | 186 | 
| 187 // InspectorDOMAgent::DOMListener implementation | 187 // InspectorDOMAgent::DOMListener implementation | 
| 188 virtual void didRemoveDocument(Document*) OVERRIDE; | 188 virtual void didRemoveDocument(Document*) override; | 
| 189 virtual void didRemoveDOMNode(Node*) OVERRIDE; | 189 virtual void didRemoveDOMNode(Node*) override; | 
| 190 virtual void didModifyDOMAttr(Element*) OVERRIDE; | 190 virtual void didModifyDOMAttr(Element*) override; | 
| 191 | 191 | 
| 192 // InspectorStyleSheet::Listener implementation | 192 // InspectorStyleSheet::Listener implementation | 
| 193 virtual void styleSheetChanged(InspectorStyleSheetBase*) OVERRIDE; | 193 virtual void styleSheetChanged(InspectorStyleSheetBase*) override; | 
| 194 virtual void willReparseStyleSheet() OVERRIDE; | 194 virtual void willReparseStyleSheet() override; | 
| 195 virtual void didReparseStyleSheet() OVERRIDE; | 195 virtual void didReparseStyleSheet() override; | 
| 196 | 196 | 
| 197 void resetPseudoStates(); | 197 void resetPseudoStates(); | 
| 198 | 198 | 
| 199 InspectorFrontend::CSS* m_frontend; | 199 InspectorFrontend::CSS* m_frontend; | 
| 200 RawPtrWillBeMember<InspectorDOMAgent> m_domAgent; | 200 RawPtrWillBeMember<InspectorDOMAgent> m_domAgent; | 
| 201 RawPtrWillBeMember<InspectorPageAgent> m_pageAgent; | 201 RawPtrWillBeMember<InspectorPageAgent> m_pageAgent; | 
| 202 RawPtrWillBeMember<InspectorResourceAgent> m_resourceAgent; | 202 RawPtrWillBeMember<InspectorResourceAgent> m_resourceAgent; | 
| 203 | 203 | 
| 204 IdToInspectorStyleSheet m_idToInspectorStyleSheet; | 204 IdToInspectorStyleSheet m_idToInspectorStyleSheet; | 
| 205 IdToInspectorStyleSheetForInlineStyle m_idToInspectorStyleSheetForInlineStyl e; | 205 IdToInspectorStyleSheetForInlineStyle m_idToInspectorStyleSheetForInlineStyl e; | 
| (...skipping 15 matching lines...) Expand all Loading... | |
| 221 bool m_isSettingStyleSheetText; | 221 bool m_isSettingStyleSheetText; | 
| 222 | 222 | 
| 223 friend class InspectorResourceContentLoaderCallback; | 223 friend class InspectorResourceContentLoaderCallback; | 
| 224 friend class StyleSheetBinder; | 224 friend class StyleSheetBinder; | 
| 225 }; | 225 }; | 
| 226 | 226 | 
| 227 | 227 | 
| 228 } // namespace blink | 228 } // namespace blink | 
| 229 | 229 | 
| 230 #endif // !defined(InspectorCSSAgent_h) | 230 #endif // !defined(InspectorCSSAgent_h) | 
| OLD | NEW |