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

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

Issue 14320027: DevTools: Track CSSStyleSheetHeaders in the front-end real time (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for trybots (with [Slow]) Created 7 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 | 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 13 matching lines...) Expand all
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef InspectorInstrumentation_h 31 #ifndef InspectorInstrumentation_h
32 #define InspectorInstrumentation_h 32 #define InspectorInstrumentation_h
33 33
34 #include "CSSImportRule.h"
35 #include "CSSRule.h"
34 #include "CSSSelector.h" 36 #include "CSSSelector.h"
37 #include "CSSStyleSheet.h"
35 #include "ConsoleAPITypes.h" 38 #include "ConsoleAPITypes.h"
36 #include "ConsoleTypes.h" 39 #include "ConsoleTypes.h"
37 #include "Element.h" 40 #include "Element.h"
38 #include "EventContext.h" 41 #include "EventContext.h"
39 #include "FormData.h" 42 #include "FormData.h"
40 #include "Frame.h" 43 #include "Frame.h"
41 #include "HitTestResult.h" 44 #include "HitTestResult.h"
42 #include "Page.h" 45 #include "Page.h"
43 #include "ScriptExecutionContext.h" 46 #include "ScriptExecutionContext.h"
44 #include "ScriptState.h" 47 #include "ScriptState.h"
45 #include "StorageArea.h" 48 #include "StorageArea.h"
46 #include "WebSocketFrame.h" 49 #include "WebSocketFrame.h"
47 #include "WebSocketHandshakeRequest.h" 50 #include "WebSocketHandshakeRequest.h"
48 #include "WebSocketHandshakeResponse.h" 51 #include "WebSocketHandshakeResponse.h"
49 #include <wtf/RefPtr.h> 52 #include <wtf/RefPtr.h>
50 #include <wtf/UnusedParam.h> 53 #include <wtf/UnusedParam.h>
54 #include <wtf/Vector.h>
51 55
52 namespace WebCore { 56 namespace WebCore {
53 57
54 class CSSRule; 58 class CSSRule;
55 class CachedResource; 59 class CachedResource;
56 class CharacterData; 60 class CharacterData;
57 class DOMWindow; 61 class DOMWindow;
58 class DOMWrapperWorld; 62 class DOMWrapperWorld;
59 class Database; 63 class Database;
60 class Document; 64 class Document;
(...skipping 20 matching lines...) Expand all
81 class ScriptArguments; 85 class ScriptArguments;
82 class ScriptCallStack; 86 class ScriptCallStack;
83 class ScriptExecutionContext; 87 class ScriptExecutionContext;
84 class ScriptObject; 88 class ScriptObject;
85 class ScriptProfile; 89 class ScriptProfile;
86 class SecurityOrigin; 90 class SecurityOrigin;
87 class ShadowRoot; 91 class ShadowRoot;
88 class StorageArea; 92 class StorageArea;
89 class StyleResolver; 93 class StyleResolver;
90 class StyleRule; 94 class StyleRule;
95 class StyleSheet;
91 class ThreadableLoaderClient; 96 class ThreadableLoaderClient;
92 class WorkerContext; 97 class WorkerContext;
93 class WorkerContextProxy; 98 class WorkerContextProxy;
94 class XMLHttpRequest; 99 class XMLHttpRequest;
95 100
96 #define FAST_RETURN_IF_NO_FRONTENDS(value) if (!hasFrontends()) return value; 101 #define FAST_RETURN_IF_NO_FRONTENDS(value) if (!hasFrontends()) return value;
97 102
98 class InspectorInstrumentationCookie { 103 class InspectorInstrumentationCookie {
99 public: 104 public:
100 InspectorInstrumentationCookie(); 105 InspectorInstrumentationCookie();
(...skipping 18 matching lines...) Expand all
119 static bool isDebuggerPaused(Frame*); 124 static bool isDebuggerPaused(Frame*);
120 125
121 static void willInsertDOMNode(Document*, Node* parent); 126 static void willInsertDOMNode(Document*, Node* parent);
122 static void didInsertDOMNode(Document*, Node*); 127 static void didInsertDOMNode(Document*, Node*);
123 static void willRemoveDOMNode(Document*, Node*); 128 static void willRemoveDOMNode(Document*, Node*);
124 static void willModifyDOMAttr(Document*, Element*, const AtomicString& oldVa lue, const AtomicString& newValue); 129 static void willModifyDOMAttr(Document*, Element*, const AtomicString& oldVa lue, const AtomicString& newValue);
125 static void didModifyDOMAttr(Document*, Element*, const AtomicString& name, const AtomicString& value); 130 static void didModifyDOMAttr(Document*, Element*, const AtomicString& name, const AtomicString& value);
126 static void didRemoveDOMAttr(Document*, Element*, const AtomicString& name); 131 static void didRemoveDOMAttr(Document*, Element*, const AtomicString& name);
127 static void characterDataModified(Document*, CharacterData*); 132 static void characterDataModified(Document*, CharacterData*);
128 static void didInvalidateStyleAttr(Document*, Node*); 133 static void didInvalidateStyleAttr(Document*, Node*);
134 static void activeStyleSheetsUpdated(Document*, const Vector<RefPtr<StyleShe et> >&);
129 static void frameWindowDiscarded(Frame*, DOMWindow*); 135 static void frameWindowDiscarded(Frame*, DOMWindow*);
130 static void mediaQueryResultChanged(Document*); 136 static void mediaQueryResultChanged(Document*);
131 static void didPushShadowRoot(Element* host, ShadowRoot*); 137 static void didPushShadowRoot(Element* host, ShadowRoot*);
132 static void willPopShadowRoot(Element* host, ShadowRoot*); 138 static void willPopShadowRoot(Element* host, ShadowRoot*);
133 static void didCreateNamedFlow(Document*, NamedFlow*); 139 static void didCreateNamedFlow(Document*, NamedFlow*);
134 static void willRemoveNamedFlow(Document*, NamedFlow*); 140 static void willRemoveNamedFlow(Document*, NamedFlow*);
135 static void didUpdateRegionLayout(Document*, NamedFlow*); 141 static void didUpdateRegionLayout(Document*, NamedFlow*);
136 142
137 static void handleMouseMove(Frame*, const PlatformMouseEvent&); 143 static void handleMouseMove(Frame*, const PlatformMouseEvent&);
138 static bool handleMousePress(Page*); 144 static bool handleMousePress(Page*);
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 305
300 static void willInsertDOMNodeImpl(InstrumentingAgents*, Node* parent); 306 static void willInsertDOMNodeImpl(InstrumentingAgents*, Node* parent);
301 static void didInsertDOMNodeImpl(InstrumentingAgents*, Node*); 307 static void didInsertDOMNodeImpl(InstrumentingAgents*, Node*);
302 static void willRemoveDOMNodeImpl(InstrumentingAgents*, Node*); 308 static void willRemoveDOMNodeImpl(InstrumentingAgents*, Node*);
303 static void didRemoveDOMNodeImpl(InstrumentingAgents*, Node*); 309 static void didRemoveDOMNodeImpl(InstrumentingAgents*, Node*);
304 static void willModifyDOMAttrImpl(InstrumentingAgents*, Element*, const Atom icString& oldValue, const AtomicString& newValue); 310 static void willModifyDOMAttrImpl(InstrumentingAgents*, Element*, const Atom icString& oldValue, const AtomicString& newValue);
305 static void didModifyDOMAttrImpl(InstrumentingAgents*, Element*, const Atomi cString& name, const AtomicString& value); 311 static void didModifyDOMAttrImpl(InstrumentingAgents*, Element*, const Atomi cString& name, const AtomicString& value);
306 static void didRemoveDOMAttrImpl(InstrumentingAgents*, Element*, const Atomi cString& name); 312 static void didRemoveDOMAttrImpl(InstrumentingAgents*, Element*, const Atomi cString& name);
307 static void characterDataModifiedImpl(InstrumentingAgents*, CharacterData*); 313 static void characterDataModifiedImpl(InstrumentingAgents*, CharacterData*);
308 static void didInvalidateStyleAttrImpl(InstrumentingAgents*, Node*); 314 static void didInvalidateStyleAttrImpl(InstrumentingAgents*, Node*);
315 static void activeStyleSheetsUpdatedImpl(InstrumentingAgents*, const Vector< RefPtr<StyleSheet> >&);
309 static void frameWindowDiscardedImpl(InstrumentingAgents*, DOMWindow*); 316 static void frameWindowDiscardedImpl(InstrumentingAgents*, DOMWindow*);
310 static void mediaQueryResultChangedImpl(InstrumentingAgents*); 317 static void mediaQueryResultChangedImpl(InstrumentingAgents*);
311 static void didPushShadowRootImpl(InstrumentingAgents*, Element* host, Shado wRoot*); 318 static void didPushShadowRootImpl(InstrumentingAgents*, Element* host, Shado wRoot*);
312 static void willPopShadowRootImpl(InstrumentingAgents*, Element* host, Shado wRoot*); 319 static void willPopShadowRootImpl(InstrumentingAgents*, Element* host, Shado wRoot*);
313 static void didCreateNamedFlowImpl(InstrumentingAgents*, Document*, NamedFlo w*); 320 static void didCreateNamedFlowImpl(InstrumentingAgents*, Document*, NamedFlo w*);
314 static void willRemoveNamedFlowImpl(InstrumentingAgents*, Document*, NamedFl ow*); 321 static void willRemoveNamedFlowImpl(InstrumentingAgents*, Document*, NamedFl ow*);
315 static void didUpdateRegionLayoutImpl(InstrumentingAgents*, Document*, Named Flow*); 322 static void didUpdateRegionLayoutImpl(InstrumentingAgents*, Document*, Named Flow*);
316 323
317 static void handleMouseMoveImpl(InstrumentingAgents*, Frame*, const Platform MouseEvent&); 324 static void handleMouseMoveImpl(InstrumentingAgents*, Frame*, const Platform MouseEvent&);
318 static bool handleTouchEventImpl(InstrumentingAgents*, Node*); 325 static bool handleTouchEventImpl(InstrumentingAgents*, Node*);
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 didRemoveDOMAttrImpl(instrumentingAgents, element, name); 550 didRemoveDOMAttrImpl(instrumentingAgents, element, name);
544 } 551 }
545 552
546 inline void InspectorInstrumentation::didInvalidateStyleAttr(Document* document, Node* node) 553 inline void InspectorInstrumentation::didInvalidateStyleAttr(Document* document, Node* node)
547 { 554 {
548 FAST_RETURN_IF_NO_FRONTENDS(void()); 555 FAST_RETURN_IF_NO_FRONTENDS(void());
549 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocumen t(document)) 556 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocumen t(document))
550 didInvalidateStyleAttrImpl(instrumentingAgents, node); 557 didInvalidateStyleAttrImpl(instrumentingAgents, node);
551 } 558 }
552 559
560 inline void InspectorInstrumentation::activeStyleSheetsUpdated(Document* documen t, const Vector<RefPtr<StyleSheet> >& newSheets)
561 {
562 FAST_RETURN_IF_NO_FRONTENDS(void());
563 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocumen t(document))
564 activeStyleSheetsUpdatedImpl(instrumentingAgents, newSheets);
565 }
566
553 inline void InspectorInstrumentation::frameWindowDiscarded(Frame* frame, DOMWind ow* domWindow) 567 inline void InspectorInstrumentation::frameWindowDiscarded(Frame* frame, DOMWind ow* domWindow)
554 { 568 {
555 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(f rame)) 569 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(f rame))
556 frameWindowDiscardedImpl(instrumentingAgents, domWindow); 570 frameWindowDiscardedImpl(instrumentingAgents, domWindow);
557 } 571 }
558 572
559 inline void InspectorInstrumentation::mediaQueryResultChanged(Document* document ) 573 inline void InspectorInstrumentation::mediaQueryResultChanged(Document* document )
560 { 574 {
561 FAST_RETURN_IF_NO_FRONTENDS(void()); 575 FAST_RETURN_IF_NO_FRONTENDS(void());
562 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocumen t(document)) 576 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocumen t(document))
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
1379 if (!page && document->templateDocumentHost()) 1393 if (!page && document->templateDocumentHost())
1380 page = document->templateDocumentHost()->page(); 1394 page = document->templateDocumentHost()->page();
1381 return instrumentingAgentsForPage(page); 1395 return instrumentingAgentsForPage(page);
1382 } 1396 }
1383 return 0; 1397 return 0;
1384 } 1398 }
1385 1399
1386 } // namespace WebCore 1400 } // namespace WebCore
1387 1401
1388 #endif // !defined(InspectorInstrumentation_h) 1402 #endif // !defined(InspectorInstrumentation_h)
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorCSSAgent.cpp ('k') | Source/core/inspector/InspectorInstrumentation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698