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

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

Issue 11366107: Merge 133052 - Web Inspector: frame chooser does not work on subsequent inspector open. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 years, 1 month 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 #include "InspectorConsoleAgent.h" 50 #include "InspectorConsoleAgent.h"
51 #include "InspectorController.h" 51 #include "InspectorController.h"
52 #include "WorkerInspectorController.h" 52 #include "WorkerInspectorController.h"
53 #include "InspectorDatabaseAgent.h" 53 #include "InspectorDatabaseAgent.h"
54 #include "InspectorDOMAgent.h" 54 #include "InspectorDOMAgent.h"
55 #include "InspectorDOMStorageAgent.h" 55 #include "InspectorDOMStorageAgent.h"
56 #include "InspectorDebuggerAgent.h" 56 #include "InspectorDebuggerAgent.h"
57 #include "InspectorPageAgent.h" 57 #include "InspectorPageAgent.h"
58 #include "InspectorProfilerAgent.h" 58 #include "InspectorProfilerAgent.h"
59 #include "InspectorResourceAgent.h" 59 #include "InspectorResourceAgent.h"
60 #include "InspectorRuntimeAgent.h"
61 #include "InspectorTimelineAgent.h" 60 #include "InspectorTimelineAgent.h"
62 #include "InspectorWorkerAgent.h" 61 #include "InspectorWorkerAgent.h"
63 #include "InstrumentingAgents.h" 62 #include "InstrumentingAgents.h"
64 #include "PageRuntimeAgent.h" 63 #include "PageRuntimeAgent.h"
65 #include "ScriptArguments.h" 64 #include "ScriptArguments.h"
66 #include "ScriptCallStack.h" 65 #include "ScriptCallStack.h"
67 #include "ScriptProfile.h" 66 #include "ScriptProfile.h"
68 #include "StyleRule.h" 67 #include "StyleRule.h"
69 #include "WorkerContext.h" 68 #include "WorkerContext.h"
69 #include "WorkerRuntimeAgent.h"
70 #include "WorkerThread.h" 70 #include "WorkerThread.h"
71 #include "XMLHttpRequest.h" 71 #include "XMLHttpRequest.h"
72 #include <wtf/StdLibExtras.h> 72 #include <wtf/StdLibExtras.h>
73 #include <wtf/text/CString.h> 73 #include <wtf/text/CString.h>
74 74
75 namespace WebCore { 75 namespace WebCore {
76 76
77 static const char* const requestAnimationFrameEventName = "requestAnimationFrame "; 77 static const char* const requestAnimationFrameEventName = "requestAnimationFrame ";
78 static const char* const cancelAnimationFrameEventName = "cancelAnimationFrame"; 78 static const char* const cancelAnimationFrameEventName = "cancelAnimationFrame";
79 static const char* const animationFrameFiredEventName = "animationFrameFired"; 79 static const char* const animationFrameFiredEventName = "animationFrameFired";
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 if (InspectorAgent* inspectorAgent = instrumentingAgents->inspectorAgent()) 120 if (InspectorAgent* inspectorAgent = instrumentingAgents->inspectorAgent())
121 inspectorAgent->didClearWindowObjectInWorld(frame, world); 121 inspectorAgent->didClearWindowObjectInWorld(frame, world);
122 #if ENABLE(JAVASCRIPT_DEBUGGER) 122 #if ENABLE(JAVASCRIPT_DEBUGGER)
123 if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents->inspectorDe buggerAgent()) { 123 if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents->inspectorDe buggerAgent()) {
124 if (pageAgent && world == mainThreadNormalWorld() && frame == pageAgent- >mainFrame()) 124 if (pageAgent && world == mainThreadNormalWorld() && frame == pageAgent- >mainFrame())
125 debuggerAgent->didClearMainFrameWindowObject(); 125 debuggerAgent->didClearMainFrameWindowObject();
126 } 126 }
127 #endif 127 #endif
128 if (PageRuntimeAgent* pageRuntimeAgent = instrumentingAgents->pageRuntimeAge nt()) { 128 if (PageRuntimeAgent* pageRuntimeAgent = instrumentingAgents->pageRuntimeAge nt()) {
129 if (world == mainThreadNormalWorld()) 129 if (world == mainThreadNormalWorld())
130 pageRuntimeAgent->didClearWindowObject(frame); 130 pageRuntimeAgent->didCreateMainWorldContext(frame);
131 } 131 }
132 } 132 }
133 133
134 bool InspectorInstrumentation::isDebuggerPausedImpl(InstrumentingAgents* instrum entingAgents) 134 bool InspectorInstrumentation::isDebuggerPausedImpl(InstrumentingAgents* instrum entingAgents)
135 { 135 {
136 #if ENABLE(JAVASCRIPT_DEBUGGER) 136 #if ENABLE(JAVASCRIPT_DEBUGGER)
137 if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents->inspectorDe buggerAgent()) 137 if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents->inspectorDe buggerAgent())
138 return debuggerAgent->isPaused(); 138 return debuggerAgent->isPaused();
139 #endif 139 #endif
140 return false; 140 return false;
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 } 1069 }
1070 1070
1071 void InspectorInstrumentation::willEvaluateWorkerScript(WorkerContext* workerCon text, int workerThreadStartMode) 1071 void InspectorInstrumentation::willEvaluateWorkerScript(WorkerContext* workerCon text, int workerThreadStartMode)
1072 { 1072 {
1073 if (workerThreadStartMode != PauseWorkerContextOnStart) 1073 if (workerThreadStartMode != PauseWorkerContextOnStart)
1074 return; 1074 return;
1075 InstrumentingAgents* instrumentingAgents = instrumentationForWorkerContext(w orkerContext); 1075 InstrumentingAgents* instrumentingAgents = instrumentationForWorkerContext(w orkerContext);
1076 if (!instrumentingAgents) 1076 if (!instrumentingAgents)
1077 return; 1077 return;
1078 #if ENABLE(JAVASCRIPT_DEBUGGER) 1078 #if ENABLE(JAVASCRIPT_DEBUGGER)
1079 if (InspectorRuntimeAgent* runtimeAgent = instrumentingAgents->inspectorRunt imeAgent()) 1079 if (WorkerRuntimeAgent* runtimeAgent = instrumentingAgents->workerRuntimeAge nt())
1080 runtimeAgent->pauseWorkerContext(workerContext); 1080 runtimeAgent->pauseWorkerContext(workerContext);
1081 #endif 1081 #endif
1082 } 1082 }
1083 1083
1084 void InspectorInstrumentation::workerContextTerminatedImpl(InstrumentingAgents* instrumentingAgents, WorkerContextProxy* proxy) 1084 void InspectorInstrumentation::workerContextTerminatedImpl(InstrumentingAgents* instrumentingAgents, WorkerContextProxy* proxy)
1085 { 1085 {
1086 if (InspectorWorkerAgent* workerAgent = instrumentingAgents->inspectorWorker Agent()) 1086 if (InspectorWorkerAgent* workerAgent = instrumentingAgents->inspectorWorker Agent())
1087 workerAgent->workerContextTerminated(proxy); 1087 workerAgent->workerContextTerminated(proxy);
1088 } 1088 }
1089 #endif 1089 #endif
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 return instrumentingAgents && instrumentingAgents->inspectorCanvasAgent(); 1157 return instrumentingAgents && instrumentingAgents->inspectorCanvasAgent();
1158 } 1158 }
1159 1159
1160 bool InspectorInstrumentation::consoleAgentEnabled(ScriptExecutionContext* scrip tExecutionContext) 1160 bool InspectorInstrumentation::consoleAgentEnabled(ScriptExecutionContext* scrip tExecutionContext)
1161 { 1161 {
1162 InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(scr iptExecutionContext); 1162 InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(scr iptExecutionContext);
1163 InspectorConsoleAgent* consoleAgent = instrumentingAgents ? instrumentingAge nts->inspectorConsoleAgent() : 0; 1163 InspectorConsoleAgent* consoleAgent = instrumentingAgents ? instrumentingAge nts->inspectorConsoleAgent() : 0;
1164 return consoleAgent && consoleAgent->enabled(); 1164 return consoleAgent && consoleAgent->enabled();
1165 } 1165 }
1166 1166
1167 bool InspectorInstrumentation::runtimeAgentEnabled(Frame* frame)
1168 {
1169 InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame );
1170 InspectorRuntimeAgent* runtimeAgent = instrumentingAgents ? instrumentingAge nts->inspectorRuntimeAgent() : 0;
1171 return runtimeAgent && runtimeAgent->enabled();
1172 }
1173
1174 bool InspectorInstrumentation::timelineAgentEnabled(ScriptExecutionContext* scri ptExecutionContext) 1167 bool InspectorInstrumentation::timelineAgentEnabled(ScriptExecutionContext* scri ptExecutionContext)
1175 { 1168 {
1176 InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(scr iptExecutionContext); 1169 InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(scr iptExecutionContext);
1177 return instrumentingAgents && instrumentingAgents->inspectorTimelineAgent(); 1170 return instrumentingAgents && instrumentingAgents->inspectorTimelineAgent();
1178 } 1171 }
1179 1172
1180 void InspectorInstrumentation::pauseOnNativeEventIfNeeded(InstrumentingAgents* i nstrumentingAgents, bool isDOMEvent, const String& eventName, bool synchronous) 1173 void InspectorInstrumentation::pauseOnNativeEventIfNeeded(InstrumentingAgents* i nstrumentingAgents, bool isDOMEvent, const String& eventName, bool synchronous)
1181 { 1174 {
1182 #if ENABLE(JAVASCRIPT_DEBUGGER) 1175 #if ENABLE(JAVASCRIPT_DEBUGGER)
1183 if (InspectorDOMDebuggerAgent* domDebuggerAgent = instrumentingAgents->inspe ctorDOMDebuggerAgent()) 1176 if (InspectorDOMDebuggerAgent* domDebuggerAgent = instrumentingAgents->inspe ctorDOMDebuggerAgent())
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1290 DeviceOrientationData* InspectorInstrumentation::overrideDeviceOrientationImpl(I nstrumentingAgents* instrumentingAgents, DeviceOrientationData* deviceOrientatio n) 1283 DeviceOrientationData* InspectorInstrumentation::overrideDeviceOrientationImpl(I nstrumentingAgents* instrumentingAgents, DeviceOrientationData* deviceOrientatio n)
1291 { 1284 {
1292 if (InspectorPageAgent* pageAgent = instrumentingAgents->inspectorPageAgent( )) 1285 if (InspectorPageAgent* pageAgent = instrumentingAgents->inspectorPageAgent( ))
1293 deviceOrientation = pageAgent->overrideDeviceOrientation(deviceOrientati on); 1286 deviceOrientation = pageAgent->overrideDeviceOrientation(deviceOrientati on);
1294 return deviceOrientation; 1287 return deviceOrientation;
1295 } 1288 }
1296 1289
1297 } // namespace WebCore 1290 } // namespace WebCore
1298 1291
1299 #endif // !ENABLE(INSPECTOR) 1292 #endif // !ENABLE(INSPECTOR)
OLDNEW
« no previous file with comments | « Source/WebCore/inspector/InspectorInstrumentation.h ('k') | Source/WebCore/inspector/InspectorPageAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698