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

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

Issue 12077053: Merge 140127 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 10 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 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 22 matching lines...) Expand all
33 33
34 #include "CSSSelector.h" 34 #include "CSSSelector.h"
35 #include "ConsoleAPITypes.h" 35 #include "ConsoleAPITypes.h"
36 #include "ConsoleTypes.h" 36 #include "ConsoleTypes.h"
37 #include "Element.h" 37 #include "Element.h"
38 #include "Frame.h" 38 #include "Frame.h"
39 #include "Page.h" 39 #include "Page.h"
40 #include "ScriptExecutionContext.h" 40 #include "ScriptExecutionContext.h"
41 #include "ScriptState.h" 41 #include "ScriptState.h"
42 #include "StorageArea.h" 42 #include "StorageArea.h"
43 #include <wtf/RefPtr.h>
43 #include <wtf/UnusedParam.h> 44 #include <wtf/UnusedParam.h>
44 45
45 namespace WebCore { 46 namespace WebCore {
46 47
47 class CSSRule; 48 class CSSRule;
48 class CharacterData; 49 class CharacterData;
49 class DOMWindow; 50 class DOMWindow;
50 class DOMWrapperWorld; 51 class DOMWrapperWorld;
51 class Database; 52 class Database;
52 class Document; 53 class Document;
53 class Element; 54 class Element;
54 class EventContext; 55 class EventContext;
55 class DocumentLoader; 56 class DocumentLoader;
56 class DeviceOrientationData; 57 class DeviceOrientationData;
57 class GeolocationPosition; 58 class GeolocationPosition;
58 class GraphicsContext; 59 class GraphicsContext;
59 class HitTestResult; 60 class HitTestResult;
60 class InspectorCSSAgent; 61 class InspectorCSSAgent;
62 class InspectorInstrumentation;
61 class InspectorTimelineAgent; 63 class InspectorTimelineAgent;
62 class InstrumentingAgents; 64 class InstrumentingAgents;
63 class KURL; 65 class KURL;
64 class Node; 66 class Node;
65 class RenderLayer; 67 class RenderLayer;
66 class RenderObject; 68 class RenderObject;
67 class ResourceRequest; 69 class ResourceRequest;
68 class ResourceResponse; 70 class ResourceResponse;
69 class ScriptArguments; 71 class ScriptArguments;
70 class ScriptCallStack; 72 class ScriptCallStack;
(...skipping 11 matching lines...) Expand all
82 class XMLHttpRequest; 84 class XMLHttpRequest;
83 85
84 #if ENABLE(WEB_SOCKETS) 86 #if ENABLE(WEB_SOCKETS)
85 struct WebSocketFrame; 87 struct WebSocketFrame;
86 class WebSocketHandshakeRequest; 88 class WebSocketHandshakeRequest;
87 class WebSocketHandshakeResponse; 89 class WebSocketHandshakeResponse;
88 #endif 90 #endif
89 91
90 #define FAST_RETURN_IF_NO_FRONTENDS(value) if (!hasFrontends()) return value; 92 #define FAST_RETURN_IF_NO_FRONTENDS(value) if (!hasFrontends()) return value;
91 93
92 typedef pair<InstrumentingAgents*, int> InspectorInstrumentationCookie; 94 class InspectorInstrumentationCookie {
95 public:
96 InspectorInstrumentationCookie();
97 InspectorInstrumentationCookie(InstrumentingAgents*, int);
98 InspectorInstrumentationCookie(const InspectorInstrumentationCookie&);
99 InspectorInstrumentationCookie& operator=(const InspectorInstrumentationCook ie&);
100 ~InspectorInstrumentationCookie();
101
102 private:
103 friend class InspectorInstrumentation;
104 InstrumentingAgents* instrumentingAgents() const { return m_instrumentingAge nts.get(); }
105 bool isValid() const { return !!m_instrumentingAgents; }
106 bool hasMatchingTimelineAgentId(int id) const { return m_timelineAgentId == id; }
107
108 RefPtr<InstrumentingAgents> m_instrumentingAgents;
109 int m_timelineAgentId;
110 };
93 111
94 class InspectorInstrumentation { 112 class InspectorInstrumentation {
95 public: 113 public:
96 static void didClearWindowObjectInWorld(Frame*, DOMWrapperWorld*); 114 static void didClearWindowObjectInWorld(Frame*, DOMWrapperWorld*);
97 static bool isDebuggerPaused(Frame*); 115 static bool isDebuggerPaused(Frame*);
98 116
99 static void willInsertDOMNode(Document*, Node* parent); 117 static void willInsertDOMNode(Document*, Node* parent);
100 static void didInsertDOMNode(Document*, Node*); 118 static void didInsertDOMNode(Document*, Node*);
101 static void willRemoveDOMNode(Document*, Node*); 119 static void willRemoveDOMNode(Document*, Node*);
102 static void willModifyDOMAttr(Document*, Element*, const AtomicString& oldVa lue, const AtomicString& newValue); 120 static void willModifyDOMAttr(Document*, Element*, const AtomicString& oldVa lue, const AtomicString& newValue);
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 UNUSED_PARAM(scriptLine); 815 UNUSED_PARAM(scriptLine);
798 #endif 816 #endif
799 return InspectorInstrumentationCookie(); 817 return InspectorInstrumentationCookie();
800 } 818 }
801 819
802 820
803 inline void InspectorInstrumentation::didCallFunction(const InspectorInstrumenta tionCookie& cookie) 821 inline void InspectorInstrumentation::didCallFunction(const InspectorInstrumenta tionCookie& cookie)
804 { 822 {
805 #if ENABLE(INSPECTOR) 823 #if ENABLE(INSPECTOR)
806 FAST_RETURN_IF_NO_FRONTENDS(void()); 824 FAST_RETURN_IF_NO_FRONTENDS(void());
807 if (cookie.first) 825 if (cookie.isValid())
808 didCallFunctionImpl(cookie); 826 didCallFunctionImpl(cookie);
809 #else 827 #else
810 UNUSED_PARAM(cookie); 828 UNUSED_PARAM(cookie);
811 #endif 829 #endif
812 } 830 }
813 831
814 inline InspectorInstrumentationCookie InspectorInstrumentation::willDispatchXHRR eadyStateChangeEvent(ScriptExecutionContext* context, XMLHttpRequest* request) 832 inline InspectorInstrumentationCookie InspectorInstrumentation::willDispatchXHRR eadyStateChangeEvent(ScriptExecutionContext* context, XMLHttpRequest* request)
815 { 833 {
816 #if ENABLE(INSPECTOR) 834 #if ENABLE(INSPECTOR)
817 FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie()); 835 FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie());
818 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext (context)) 836 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext (context))
819 return willDispatchXHRReadyStateChangeEventImpl(instrumentingAgents, req uest, context); 837 return willDispatchXHRReadyStateChangeEventImpl(instrumentingAgents, req uest, context);
820 #else 838 #else
821 UNUSED_PARAM(context); 839 UNUSED_PARAM(context);
822 UNUSED_PARAM(request); 840 UNUSED_PARAM(request);
823 #endif 841 #endif
824 return InspectorInstrumentationCookie(); 842 return InspectorInstrumentationCookie();
825 } 843 }
826 844
827 inline void InspectorInstrumentation::didDispatchXHRReadyStateChangeEvent(const InspectorInstrumentationCookie& cookie) 845 inline void InspectorInstrumentation::didDispatchXHRReadyStateChangeEvent(const InspectorInstrumentationCookie& cookie)
828 { 846 {
829 #if ENABLE(INSPECTOR) 847 #if ENABLE(INSPECTOR)
830 FAST_RETURN_IF_NO_FRONTENDS(void()); 848 FAST_RETURN_IF_NO_FRONTENDS(void());
831 if (cookie.first) 849 if (cookie.isValid())
832 didDispatchXHRReadyStateChangeEventImpl(cookie); 850 didDispatchXHRReadyStateChangeEventImpl(cookie);
833 #else 851 #else
834 UNUSED_PARAM(cookie); 852 UNUSED_PARAM(cookie);
835 #endif 853 #endif
836 } 854 }
837 855
838 inline InspectorInstrumentationCookie InspectorInstrumentation::willDispatchEven t(Document* document, const Event& event, DOMWindow* window, Node* node, const V ector<EventContext>& ancestors) 856 inline InspectorInstrumentationCookie InspectorInstrumentation::willDispatchEven t(Document* document, const Event& event, DOMWindow* window, Node* node, const V ector<EventContext>& ancestors)
839 { 857 {
840 #if ENABLE(INSPECTOR) 858 #if ENABLE(INSPECTOR)
841 FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie()); 859 FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie());
842 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocumen t(document)) 860 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocumen t(document))
843 return willDispatchEventImpl(instrumentingAgents, event, window, node, a ncestors, document); 861 return willDispatchEventImpl(instrumentingAgents, event, window, node, a ncestors, document);
844 #else 862 #else
845 UNUSED_PARAM(document); 863 UNUSED_PARAM(document);
846 UNUSED_PARAM(event); 864 UNUSED_PARAM(event);
847 UNUSED_PARAM(window); 865 UNUSED_PARAM(window);
848 UNUSED_PARAM(node); 866 UNUSED_PARAM(node);
849 UNUSED_PARAM(ancestors); 867 UNUSED_PARAM(ancestors);
850 #endif 868 #endif
851 return InspectorInstrumentationCookie(); 869 return InspectorInstrumentationCookie();
852 } 870 }
853 871
854 inline void InspectorInstrumentation::didDispatchEvent(const InspectorInstrument ationCookie& cookie) 872 inline void InspectorInstrumentation::didDispatchEvent(const InspectorInstrument ationCookie& cookie)
855 { 873 {
856 #if ENABLE(INSPECTOR) 874 #if ENABLE(INSPECTOR)
857 FAST_RETURN_IF_NO_FRONTENDS(void()); 875 FAST_RETURN_IF_NO_FRONTENDS(void());
858 if (cookie.first) 876 if (cookie.isValid())
859 didDispatchEventImpl(cookie); 877 didDispatchEventImpl(cookie);
860 #else 878 #else
861 UNUSED_PARAM(cookie); 879 UNUSED_PARAM(cookie);
862 #endif 880 #endif
863 } 881 }
864 882
865 inline InspectorInstrumentationCookie InspectorInstrumentation::willHandleEvent( ScriptExecutionContext* context, Event* event) 883 inline InspectorInstrumentationCookie InspectorInstrumentation::willHandleEvent( ScriptExecutionContext* context, Event* event)
866 { 884 {
867 #if ENABLE(INSPECTOR) 885 #if ENABLE(INSPECTOR)
868 FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie()); 886 FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie());
869 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext (context)) 887 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext (context))
870 return willHandleEventImpl(instrumentingAgents, event); 888 return willHandleEventImpl(instrumentingAgents, event);
871 #else 889 #else
872 UNUSED_PARAM(context); 890 UNUSED_PARAM(context);
873 UNUSED_PARAM(event); 891 UNUSED_PARAM(event);
874 #endif 892 #endif
875 return InspectorInstrumentationCookie(); 893 return InspectorInstrumentationCookie();
876 } 894 }
877 895
878 inline void InspectorInstrumentation::didHandleEvent(const InspectorInstrumentat ionCookie& cookie) 896 inline void InspectorInstrumentation::didHandleEvent(const InspectorInstrumentat ionCookie& cookie)
879 { 897 {
880 #if ENABLE(INSPECTOR) 898 #if ENABLE(INSPECTOR)
881 FAST_RETURN_IF_NO_FRONTENDS(void()); 899 FAST_RETURN_IF_NO_FRONTENDS(void());
882 if (cookie.first) 900 if (cookie.isValid())
883 didHandleEventImpl(cookie); 901 didHandleEventImpl(cookie);
884 #else 902 #else
885 UNUSED_PARAM(cookie); 903 UNUSED_PARAM(cookie);
886 #endif 904 #endif
887 } 905 }
888 906
889 inline InspectorInstrumentationCookie InspectorInstrumentation::willDispatchEven tOnWindow(Frame* frame, const Event& event, DOMWindow* window) 907 inline InspectorInstrumentationCookie InspectorInstrumentation::willDispatchEven tOnWindow(Frame* frame, const Event& event, DOMWindow* window)
890 { 908 {
891 #if ENABLE(INSPECTOR) 909 #if ENABLE(INSPECTOR)
892 FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie()); 910 FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie());
893 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(f rame)) 911 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(f rame))
894 return willDispatchEventOnWindowImpl(instrumentingAgents, event, window) ; 912 return willDispatchEventOnWindowImpl(instrumentingAgents, event, window) ;
895 #else 913 #else
896 UNUSED_PARAM(frame); 914 UNUSED_PARAM(frame);
897 UNUSED_PARAM(event); 915 UNUSED_PARAM(event);
898 UNUSED_PARAM(window); 916 UNUSED_PARAM(window);
899 #endif 917 #endif
900 return InspectorInstrumentationCookie(); 918 return InspectorInstrumentationCookie();
901 } 919 }
902 920
903 inline void InspectorInstrumentation::didDispatchEventOnWindow(const InspectorIn strumentationCookie& cookie) 921 inline void InspectorInstrumentation::didDispatchEventOnWindow(const InspectorIn strumentationCookie& cookie)
904 { 922 {
905 #if ENABLE(INSPECTOR) 923 #if ENABLE(INSPECTOR)
906 FAST_RETURN_IF_NO_FRONTENDS(void()); 924 FAST_RETURN_IF_NO_FRONTENDS(void());
907 if (cookie.first) 925 if (cookie.isValid())
908 didDispatchEventOnWindowImpl(cookie); 926 didDispatchEventOnWindowImpl(cookie);
909 #else 927 #else
910 UNUSED_PARAM(cookie); 928 UNUSED_PARAM(cookie);
911 #endif 929 #endif
912 } 930 }
913 931
914 inline InspectorInstrumentationCookie InspectorInstrumentation::willEvaluateScri pt(Frame* frame, const String& url, int lineNumber) 932 inline InspectorInstrumentationCookie InspectorInstrumentation::willEvaluateScri pt(Frame* frame, const String& url, int lineNumber)
915 { 933 {
916 #if ENABLE(INSPECTOR) 934 #if ENABLE(INSPECTOR)
917 FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie()); 935 FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie());
918 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(f rame)) 936 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(f rame))
919 return willEvaluateScriptImpl(instrumentingAgents, url, lineNumber, fram e); 937 return willEvaluateScriptImpl(instrumentingAgents, url, lineNumber, fram e);
920 #else 938 #else
921 UNUSED_PARAM(frame); 939 UNUSED_PARAM(frame);
922 UNUSED_PARAM(url); 940 UNUSED_PARAM(url);
923 UNUSED_PARAM(lineNumber); 941 UNUSED_PARAM(lineNumber);
924 #endif 942 #endif
925 return InspectorInstrumentationCookie(); 943 return InspectorInstrumentationCookie();
926 } 944 }
927 945
928 inline void InspectorInstrumentation::didEvaluateScript(const InspectorInstrumen tationCookie& cookie) 946 inline void InspectorInstrumentation::didEvaluateScript(const InspectorInstrumen tationCookie& cookie)
929 { 947 {
930 #if ENABLE(INSPECTOR) 948 #if ENABLE(INSPECTOR)
931 FAST_RETURN_IF_NO_FRONTENDS(void()); 949 FAST_RETURN_IF_NO_FRONTENDS(void());
932 if (cookie.first) 950 if (cookie.isValid())
933 didEvaluateScriptImpl(cookie); 951 didEvaluateScriptImpl(cookie);
934 #else 952 #else
935 UNUSED_PARAM(cookie); 953 UNUSED_PARAM(cookie);
936 #endif 954 #endif
937 } 955 }
938 956
939 inline void InspectorInstrumentation::didCreateIsolatedContext(Frame* frame, Scr iptState* scriptState, SecurityOrigin* origin) 957 inline void InspectorInstrumentation::didCreateIsolatedContext(Frame* frame, Scr iptState* scriptState, SecurityOrigin* origin)
940 { 958 {
941 #if ENABLE(INSPECTOR) 959 #if ENABLE(INSPECTOR)
942 FAST_RETURN_IF_NO_FRONTENDS(void()); 960 FAST_RETURN_IF_NO_FRONTENDS(void());
(...skipping 16 matching lines...) Expand all
959 UNUSED_PARAM(context); 977 UNUSED_PARAM(context);
960 UNUSED_PARAM(timerId); 978 UNUSED_PARAM(timerId);
961 #endif 979 #endif
962 return InspectorInstrumentationCookie(); 980 return InspectorInstrumentationCookie();
963 } 981 }
964 982
965 inline void InspectorInstrumentation::didFireTimer(const InspectorInstrumentatio nCookie& cookie) 983 inline void InspectorInstrumentation::didFireTimer(const InspectorInstrumentatio nCookie& cookie)
966 { 984 {
967 #if ENABLE(INSPECTOR) 985 #if ENABLE(INSPECTOR)
968 FAST_RETURN_IF_NO_FRONTENDS(void()); 986 FAST_RETURN_IF_NO_FRONTENDS(void());
969 if (cookie.first) 987 if (cookie.isValid())
970 didFireTimerImpl(cookie); 988 didFireTimerImpl(cookie);
971 #else 989 #else
972 UNUSED_PARAM(cookie); 990 UNUSED_PARAM(cookie);
973 #endif 991 #endif
974 } 992 }
975 993
976 inline void InspectorInstrumentation::didBeginFrame(Page* page) 994 inline void InspectorInstrumentation::didBeginFrame(Page* page)
977 { 995 {
978 #if ENABLE(INSPECTOR) 996 #if ENABLE(INSPECTOR)
979 FAST_RETURN_IF_NO_FRONTENDS(void()); 997 FAST_RETURN_IF_NO_FRONTENDS(void());
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 #else 1033 #else
1016 UNUSED_PARAM(frame); 1034 UNUSED_PARAM(frame);
1017 #endif 1035 #endif
1018 return InspectorInstrumentationCookie(); 1036 return InspectorInstrumentationCookie();
1019 } 1037 }
1020 1038
1021 inline void InspectorInstrumentation::didLayout(const InspectorInstrumentationCo okie& cookie, RenderObject* root) 1039 inline void InspectorInstrumentation::didLayout(const InspectorInstrumentationCo okie& cookie, RenderObject* root)
1022 { 1040 {
1023 #if ENABLE(INSPECTOR) 1041 #if ENABLE(INSPECTOR)
1024 FAST_RETURN_IF_NO_FRONTENDS(void()); 1042 FAST_RETURN_IF_NO_FRONTENDS(void());
1025 if (cookie.first) 1043 if (cookie.isValid())
1026 didLayoutImpl(cookie, root); 1044 didLayoutImpl(cookie, root);
1027 #else 1045 #else
1028 UNUSED_PARAM(cookie); 1046 UNUSED_PARAM(cookie);
1029 UNUSED_PARAM(root); 1047 UNUSED_PARAM(root);
1030 #endif 1048 #endif
1031 } 1049 }
1032 1050
1033 inline void InspectorInstrumentation::didScroll(Page* page) 1051 inline void InspectorInstrumentation::didScroll(Page* page)
1034 { 1052 {
1035 #if ENABLE(INSPECTOR) 1053 #if ENABLE(INSPECTOR)
(...skipping 15 matching lines...) Expand all
1051 UNUSED_PARAM(context); 1069 UNUSED_PARAM(context);
1052 UNUSED_PARAM(request); 1070 UNUSED_PARAM(request);
1053 #endif 1071 #endif
1054 return InspectorInstrumentationCookie(); 1072 return InspectorInstrumentationCookie();
1055 } 1073 }
1056 1074
1057 inline void InspectorInstrumentation::didDispatchXHRLoadEvent(const InspectorIns trumentationCookie& cookie) 1075 inline void InspectorInstrumentation::didDispatchXHRLoadEvent(const InspectorIns trumentationCookie& cookie)
1058 { 1076 {
1059 #if ENABLE(INSPECTOR) 1077 #if ENABLE(INSPECTOR)
1060 FAST_RETURN_IF_NO_FRONTENDS(void()); 1078 FAST_RETURN_IF_NO_FRONTENDS(void());
1061 if (cookie.first) 1079 if (cookie.isValid())
1062 didDispatchXHRLoadEventImpl(cookie); 1080 didDispatchXHRLoadEventImpl(cookie);
1063 #else 1081 #else
1064 UNUSED_PARAM(cookie); 1082 UNUSED_PARAM(cookie);
1065 #endif 1083 #endif
1066 } 1084 }
1067 1085
1068 inline InspectorInstrumentationCookie InspectorInstrumentation::willPaint(Frame* frame) 1086 inline InspectorInstrumentationCookie InspectorInstrumentation::willPaint(Frame* frame)
1069 { 1087 {
1070 #if ENABLE(INSPECTOR) 1088 #if ENABLE(INSPECTOR)
1071 FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie()); 1089 FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie());
1072 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(f rame)) 1090 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(f rame))
1073 return willPaintImpl(instrumentingAgents, frame); 1091 return willPaintImpl(instrumentingAgents, frame);
1074 #else 1092 #else
1075 UNUSED_PARAM(frame); 1093 UNUSED_PARAM(frame);
1076 #endif 1094 #endif
1077 return InspectorInstrumentationCookie(); 1095 return InspectorInstrumentationCookie();
1078 } 1096 }
1079 1097
1080 inline void InspectorInstrumentation::didPaint(const InspectorInstrumentationCoo kie& cookie, GraphicsContext* context, const LayoutRect& rect) 1098 inline void InspectorInstrumentation::didPaint(const InspectorInstrumentationCoo kie& cookie, GraphicsContext* context, const LayoutRect& rect)
1081 { 1099 {
1082 #if ENABLE(INSPECTOR) 1100 #if ENABLE(INSPECTOR)
1083 FAST_RETURN_IF_NO_FRONTENDS(void()); 1101 FAST_RETURN_IF_NO_FRONTENDS(void());
1084 if (cookie.first) 1102 if (cookie.isValid())
1085 didPaintImpl(cookie, context, rect); 1103 didPaintImpl(cookie, context, rect);
1086 #else 1104 #else
1087 UNUSED_PARAM(cookie); 1105 UNUSED_PARAM(cookie);
1088 UNUSED_PARAM(context); 1106 UNUSED_PARAM(context);
1089 UNUSED_PARAM(rect); 1107 UNUSED_PARAM(rect);
1090 #endif 1108 #endif
1091 } 1109 }
1092 1110
1093 inline void InspectorInstrumentation::willScrollLayer(Frame* frame) 1111 inline void InspectorInstrumentation::willScrollLayer(Frame* frame)
1094 { 1112 {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 #else 1161 #else
1144 UNUSED_PARAM(document); 1162 UNUSED_PARAM(document);
1145 #endif 1163 #endif
1146 return InspectorInstrumentationCookie(); 1164 return InspectorInstrumentationCookie();
1147 } 1165 }
1148 1166
1149 inline void InspectorInstrumentation::didRecalculateStyle(const InspectorInstrum entationCookie& cookie) 1167 inline void InspectorInstrumentation::didRecalculateStyle(const InspectorInstrum entationCookie& cookie)
1150 { 1168 {
1151 #if ENABLE(INSPECTOR) 1169 #if ENABLE(INSPECTOR)
1152 FAST_RETURN_IF_NO_FRONTENDS(void()); 1170 FAST_RETURN_IF_NO_FRONTENDS(void());
1153 if (cookie.first) 1171 if (cookie.isValid())
1154 didRecalculateStyleImpl(cookie); 1172 didRecalculateStyleImpl(cookie);
1155 #else 1173 #else
1156 UNUSED_PARAM(cookie); 1174 UNUSED_PARAM(cookie);
1157 #endif 1175 #endif
1158 } 1176 }
1159 1177
1160 inline void InspectorInstrumentation::didScheduleStyleRecalculation(Document* do cument) 1178 inline void InspectorInstrumentation::didScheduleStyleRecalculation(Document* do cument)
1161 { 1179 {
1162 #if ENABLE(INSPECTOR) 1180 #if ENABLE(INSPECTOR)
1163 FAST_RETURN_IF_NO_FRONTENDS(void()); 1181 FAST_RETURN_IF_NO_FRONTENDS(void());
(...skipping 15 matching lines...) Expand all
1179 UNUSED_PARAM(rule); 1197 UNUSED_PARAM(rule);
1180 UNUSED_PARAM(styleResolver); 1198 UNUSED_PARAM(styleResolver);
1181 #endif 1199 #endif
1182 return InspectorInstrumentationCookie(); 1200 return InspectorInstrumentationCookie();
1183 } 1201 }
1184 1202
1185 inline void InspectorInstrumentation::didMatchRule(const InspectorInstrumentatio nCookie& cookie, bool matched) 1203 inline void InspectorInstrumentation::didMatchRule(const InspectorInstrumentatio nCookie& cookie, bool matched)
1186 { 1204 {
1187 #if ENABLE(INSPECTOR) 1205 #if ENABLE(INSPECTOR)
1188 FAST_RETURN_IF_NO_FRONTENDS(void()); 1206 FAST_RETURN_IF_NO_FRONTENDS(void());
1189 if (cookie.first) 1207 if (cookie.isValid())
1190 didMatchRuleImpl(cookie, matched); 1208 didMatchRuleImpl(cookie, matched);
1191 #else 1209 #else
1192 UNUSED_PARAM(cookie); 1210 UNUSED_PARAM(cookie);
1193 UNUSED_PARAM(matched); 1211 UNUSED_PARAM(matched);
1194 #endif 1212 #endif
1195 } 1213 }
1196 1214
1197 inline InspectorInstrumentationCookie InspectorInstrumentation::willProcessRule( Document* document, StyleRule* rule, StyleResolver* styleResolver) 1215 inline InspectorInstrumentationCookie InspectorInstrumentation::willProcessRule( Document* document, StyleRule* rule, StyleResolver* styleResolver)
1198 { 1216 {
1199 #if ENABLE(INSPECTOR) 1217 #if ENABLE(INSPECTOR)
1200 FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie()); 1218 FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie());
1201 if (!rule) 1219 if (!rule)
1202 return InspectorInstrumentationCookie(); 1220 return InspectorInstrumentationCookie();
1203 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocumen t(document)) 1221 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocumen t(document))
1204 return willProcessRuleImpl(instrumentingAgents, rule, styleResolver); 1222 return willProcessRuleImpl(instrumentingAgents, rule, styleResolver);
1205 #else 1223 #else
1206 UNUSED_PARAM(document); 1224 UNUSED_PARAM(document);
1207 UNUSED_PARAM(rule); 1225 UNUSED_PARAM(rule);
1208 UNUSED_PARAM(styleResolver); 1226 UNUSED_PARAM(styleResolver);
1209 #endif 1227 #endif
1210 return InspectorInstrumentationCookie(); 1228 return InspectorInstrumentationCookie();
1211 } 1229 }
1212 1230
1213 inline void InspectorInstrumentation::didProcessRule(const InspectorInstrumentat ionCookie& cookie) 1231 inline void InspectorInstrumentation::didProcessRule(const InspectorInstrumentat ionCookie& cookie)
1214 { 1232 {
1215 #if ENABLE(INSPECTOR) 1233 #if ENABLE(INSPECTOR)
1216 FAST_RETURN_IF_NO_FRONTENDS(void()); 1234 FAST_RETURN_IF_NO_FRONTENDS(void());
1217 if (cookie.first) 1235 if (cookie.isValid())
1218 didProcessRuleImpl(cookie); 1236 didProcessRuleImpl(cookie);
1219 #else 1237 #else
1220 UNUSED_PARAM(cookie); 1238 UNUSED_PARAM(cookie);
1221 #endif 1239 #endif
1222 } 1240 }
1223 1241
1224 inline void InspectorInstrumentation::applyUserAgentOverride(Frame* frame, Strin g* userAgent) 1242 inline void InspectorInstrumentation::applyUserAgentOverride(Frame* frame, Strin g* userAgent)
1225 { 1243 {
1226 #if ENABLE(INSPECTOR) 1244 #if ENABLE(INSPECTOR)
1227 FAST_RETURN_IF_NO_FRONTENDS(void()); 1245 FAST_RETURN_IF_NO_FRONTENDS(void());
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1355 UNUSED_PARAM(identifier); 1373 UNUSED_PARAM(identifier);
1356 UNUSED_PARAM(length); 1374 UNUSED_PARAM(length);
1357 #endif 1375 #endif
1358 return InspectorInstrumentationCookie(); 1376 return InspectorInstrumentationCookie();
1359 } 1377 }
1360 1378
1361 inline void InspectorInstrumentation::didReceiveResourceData(const InspectorInst rumentationCookie& cookie) 1379 inline void InspectorInstrumentation::didReceiveResourceData(const InspectorInst rumentationCookie& cookie)
1362 { 1380 {
1363 #if ENABLE(INSPECTOR) 1381 #if ENABLE(INSPECTOR)
1364 FAST_RETURN_IF_NO_FRONTENDS(void()); 1382 FAST_RETURN_IF_NO_FRONTENDS(void());
1365 if (cookie.first) 1383 if (cookie.isValid())
1366 didReceiveResourceDataImpl(cookie); 1384 didReceiveResourceDataImpl(cookie);
1367 #else 1385 #else
1368 UNUSED_PARAM(cookie); 1386 UNUSED_PARAM(cookie);
1369 #endif 1387 #endif
1370 } 1388 }
1371 1389
1372 inline InspectorInstrumentationCookie InspectorInstrumentation::willReceiveResou rceResponse(Frame* frame, unsigned long identifier, const ResourceResponse& resp onse) 1390 inline InspectorInstrumentationCookie InspectorInstrumentation::willReceiveResou rceResponse(Frame* frame, unsigned long identifier, const ResourceResponse& resp onse)
1373 { 1391 {
1374 #if ENABLE(INSPECTOR) 1392 #if ENABLE(INSPECTOR)
1375 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(f rame)) 1393 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(f rame))
1376 return willReceiveResourceResponseImpl(instrumentingAgents, identifier, response, frame); 1394 return willReceiveResourceResponseImpl(instrumentingAgents, identifier, response, frame);
1377 #else 1395 #else
1378 UNUSED_PARAM(frame); 1396 UNUSED_PARAM(frame);
1379 UNUSED_PARAM(identifier); 1397 UNUSED_PARAM(identifier);
1380 UNUSED_PARAM(response); 1398 UNUSED_PARAM(response);
1381 #endif 1399 #endif
1382 return InspectorInstrumentationCookie(); 1400 return InspectorInstrumentationCookie();
1383 } 1401 }
1384 1402
1385 inline void InspectorInstrumentation::didReceiveResourceResponse(const Inspector InstrumentationCookie& cookie, unsigned long identifier, DocumentLoader* loader, const ResourceResponse& response, ResourceLoader* resourceLoader) 1403 inline void InspectorInstrumentation::didReceiveResourceResponse(const Inspector InstrumentationCookie& cookie, unsigned long identifier, DocumentLoader* loader, const ResourceResponse& response, ResourceLoader* resourceLoader)
1386 { 1404 {
1387 #if ENABLE(INSPECTOR) 1405 #if ENABLE(INSPECTOR)
1388 // Call this unconditionally so that we're able to log to console with no fr ont-end attached. 1406 // Call this unconditionally so that we're able to log to console with no fr ont-end attached.
1389 didReceiveResourceResponseImpl(cookie, identifier, loader, response, resourc eLoader); 1407 if (cookie.isValid())
1408 didReceiveResourceResponseImpl(cookie, identifier, loader, response, res ourceLoader);
1390 #else 1409 #else
1391 UNUSED_PARAM(cookie); 1410 UNUSED_PARAM(cookie);
1392 UNUSED_PARAM(identifier); 1411 UNUSED_PARAM(identifier);
1393 UNUSED_PARAM(loader); 1412 UNUSED_PARAM(loader);
1394 UNUSED_PARAM(response); 1413 UNUSED_PARAM(response);
1395 UNUSED_PARAM(resourceLoader); 1414 UNUSED_PARAM(resourceLoader);
1396 #endif 1415 #endif
1397 } 1416 }
1398 1417
1399 inline void InspectorInstrumentation::continueAfterXFrameOptionsDenied(Frame* fr ame, DocumentLoader* loader, unsigned long identifier, const ResourceResponse& r ) 1418 inline void InspectorInstrumentation::continueAfterXFrameOptionsDenied(Frame* fr ame, DocumentLoader* loader, unsigned long identifier, const ResourceResponse& r )
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1675 UNUSED_PARAM(length); 1694 UNUSED_PARAM(length);
1676 UNUSED_PARAM(startLine); 1695 UNUSED_PARAM(startLine);
1677 #endif 1696 #endif
1678 return InspectorInstrumentationCookie(); 1697 return InspectorInstrumentationCookie();
1679 } 1698 }
1680 1699
1681 inline void InspectorInstrumentation::didWriteHTML(const InspectorInstrumentatio nCookie& cookie, unsigned int endLine) 1700 inline void InspectorInstrumentation::didWriteHTML(const InspectorInstrumentatio nCookie& cookie, unsigned int endLine)
1682 { 1701 {
1683 #if ENABLE(INSPECTOR) 1702 #if ENABLE(INSPECTOR)
1684 FAST_RETURN_IF_NO_FRONTENDS(void()); 1703 FAST_RETURN_IF_NO_FRONTENDS(void());
1685 if (cookie.first) 1704 if (cookie.isValid())
1686 didWriteHTMLImpl(cookie, endLine); 1705 didWriteHTMLImpl(cookie, endLine);
1687 #else 1706 #else
1688 UNUSED_PARAM(cookie); 1707 UNUSED_PARAM(cookie);
1689 UNUSED_PARAM(endLine); 1708 UNUSED_PARAM(endLine);
1690 #endif 1709 #endif
1691 } 1710 }
1692 1711
1693 inline void InspectorInstrumentation::didUseDOMStorage(Page* page, StorageArea* storageArea, bool isLocalStorage, Frame* frame) 1712 inline void InspectorInstrumentation::didUseDOMStorage(Page* page, StorageArea* storageArea, bool isLocalStorage, Frame* frame)
1694 { 1713 {
1695 #if ENABLE(INSPECTOR) 1714 #if ENABLE(INSPECTOR)
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
1894 UNUSED_PARAM(document); 1913 UNUSED_PARAM(document);
1895 UNUSED_PARAM(callbackId); 1914 UNUSED_PARAM(callbackId);
1896 #endif 1915 #endif
1897 return InspectorInstrumentationCookie(); 1916 return InspectorInstrumentationCookie();
1898 } 1917 }
1899 1918
1900 inline void InspectorInstrumentation::didFireAnimationFrame(const InspectorInstr umentationCookie& cookie) 1919 inline void InspectorInstrumentation::didFireAnimationFrame(const InspectorInstr umentationCookie& cookie)
1901 { 1920 {
1902 #if ENABLE(INSPECTOR) 1921 #if ENABLE(INSPECTOR)
1903 FAST_RETURN_IF_NO_FRONTENDS(void()); 1922 FAST_RETURN_IF_NO_FRONTENDS(void());
1904 if (cookie.first) 1923 if (cookie.isValid())
1905 didFireAnimationFrameImpl(cookie); 1924 didFireAnimationFrameImpl(cookie);
1906 #else 1925 #else
1907 UNUSED_PARAM(cookie); 1926 UNUSED_PARAM(cookie);
1908 #endif 1927 #endif
1909 } 1928 }
1910 1929
1911 #if ENABLE(GEOLOCATION) 1930 #if ENABLE(GEOLOCATION)
1912 inline GeolocationPosition* InspectorInstrumentation::overrideGeolocationPositio n(Page* page, GeolocationPosition* position) 1931 inline GeolocationPosition* InspectorInstrumentation::overrideGeolocationPositio n(Page* page, GeolocationPosition* position)
1913 { 1932 {
1914 #if ENABLE(INSPECTOR) 1933 #if ENABLE(INSPECTOR)
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
1990 { 2009 {
1991 if (document) 2010 if (document)
1992 return instrumentingAgentsForPage(document->page()); 2011 return instrumentingAgentsForPage(document->page());
1993 return 0; 2012 return 0;
1994 } 2013 }
1995 #endif 2014 #endif
1996 2015
1997 } // namespace WebCore 2016 } // namespace WebCore
1998 2017
1999 #endif // !defined(InspectorInstrumentation_h) 2018 #endif // !defined(InspectorInstrumentation_h)
OLDNEW
« no previous file with comments | « Source/WebCore/inspector/InspectorController.cpp ('k') | Source/WebCore/inspector/InspectorInstrumentation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698