Changeset 49565 in webkit
- Timestamp:
- Oct 14, 2009 9:21:06 AM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r49562 r49565 1 2009-10-13 Kelly Norton <knorton@google.com> 2 3 Reviewed by Pavel Feldman. 4 5 Removes the persistent setting for InspectorTimelineAgent and renames timeline related 6 interfaces to be more consistent with the JavaScript profiler. 7 8 * inspector/InspectorBackend.cpp: 9 (WebCore::InspectorBackend::startTimelineProfiler): 10 (WebCore::InspectorBackend::stopTimelineProfiler): 11 (WebCore::InspectorBackend::timelineProfilerEnabled): 12 * inspector/InspectorBackend.h: 13 * inspector/InspectorBackend.idl: 14 * inspector/InspectorController.cpp: 15 (WebCore::InspectorController::setFrontendProxyObject): 16 (WebCore::InspectorController::startTimelineProfiler): 17 (WebCore::InspectorController::stopTimelineProfiler): 18 (WebCore::InspectorController::timelineProfilerEnabled): 19 * inspector/InspectorController.h: 20 * inspector/InspectorFrontend.cpp: 21 (WebCore::InspectorFrontend::timelineProfilerWasStarted): 22 (WebCore::InspectorFrontend::timelineProfilerWasStopped): 23 * inspector/InspectorFrontend.h: 24 * inspector/front-end/TimelineAgent.js: 25 (WebInspector.timelineProfilerWasStarted): 26 (WebInspector.timelineProfilerWasStopped): 27 1 28 2009-10-01 Yong Li <yong.li@torchmobile.com> 2 29 -
trunk/WebCore/inspector/InspectorBackend.cpp
r49560 r49565 259 259 } 260 260 261 void InspectorBackend:: enableTimeline(bool always)262 { 263 if (m_inspectorController) 264 m_inspectorController-> enableTimeline(always);265 } 266 267 void InspectorBackend:: disableTimeline(bool always)268 { 269 if (m_inspectorController) 270 m_inspectorController-> disableTimeline(always);271 } 272 273 bool InspectorBackend::timeline Enabled() const274 { 275 if (m_inspectorController) 276 return m_inspectorController->timeline Enabled();261 void InspectorBackend::startTimelineProfiler() 262 { 263 if (m_inspectorController) 264 m_inspectorController->startTimelineProfiler(); 265 } 266 267 void InspectorBackend::stopTimelineProfiler() 268 { 269 if (m_inspectorController) 270 m_inspectorController->stopTimelineProfiler(); 271 } 272 273 bool InspectorBackend::timelineProfilerEnabled() const 274 { 275 if (m_inspectorController) 276 return m_inspectorController->timelineProfilerEnabled(); 277 277 return false; 278 278 } -
trunk/WebCore/inspector/InspectorBackend.h
r49560 r49565 96 96 const String& platform() const; 97 97 98 void enableTimeline(bool always);99 void disableTimeline(bool always);100 bool timeline Enabled() const;98 void startTimelineProfiler(); 99 void stopTimelineProfiler(); 100 bool timelineProfilerEnabled() const; 101 101 102 102 #if ENABLE(JAVASCRIPT_DEBUGGER) -
trunk/WebCore/inspector/InspectorBackend.idl
r49560 r49565 62 62 DOMString hiddenPanels(); 63 63 DOMString platform(); 64 void enableTimeline(in boolean always);65 void disableTimeline(in boolean always);66 boolean timeline Enabled();64 void startTimelineProfiler(); 65 void stopTimelineProfiler(); 66 boolean timelineProfilerEnabled(); 67 67 [ImplementationFunction=moveWindowBy] void moveByUnrestricted(in float x, in float y); 68 68 void setAttachedWindowHeight(in unsigned long height); -
trunk/WebCore/inspector/InspectorController.cpp
r49560 r49565 114 114 static const char* const inspectorAttachedHeightName = "inspectorAttachedHeight"; 115 115 static const char* const lastActivePanelSettingName = "lastActivePanel"; 116 static const char* const timelineEnabledSettingName = "timelineEnabled";117 116 118 117 static const unsigned defaultAttachedHeight = 300; … … 555 554 m_frontend.set(new InspectorFrontend(this, scriptState, webInspectorObj)); 556 555 m_domAgent = new InspectorDOMAgent(m_frontend.get()); 557 558 Setting timelineEnabled = setting(timelineEnabledSettingName); 559 if (m_timelineAgent.get() || (timelineEnabled.type() == Setting::BooleanType && timelineEnabled.booleanValue())) 560 m_timelineAgent = new InspectorTimelineAgent(m_frontend.get()); 556 m_timelineAgent = 0; 561 557 } 562 558 … … 1083 1079 } 1084 1080 1085 void InspectorController::enableTimeline(bool always) 1086 { 1087 if (!enabled()) 1088 return; 1089 1090 if (always) 1091 setSetting(timelineEnabledSettingName, Setting(true)); 1092 1093 if (m_timelineAgent.get()) 1081 void InspectorController::startTimelineProfiler() 1082 { 1083 if (!enabled()) 1084 return; 1085 1086 if (m_timelineAgent) 1094 1087 return; 1095 1088 1096 1089 m_timelineAgent = new InspectorTimelineAgent(m_frontend.get()); 1097 1090 if (m_frontend) 1098 m_frontend->timelineWasEnabled(); 1099 } 1100 1101 void InspectorController::disableTimeline(bool always) 1102 { 1103 if (!enabled()) 1104 return; 1105 1106 if (always) 1107 setSetting(timelineEnabledSettingName, Setting(false)); 1108 1109 if (!m_timelineAgent.get()) 1110 return; 1111 1112 m_timelineAgent.set(0); 1091 m_frontend->timelineProfilerWasStarted(); 1092 } 1093 1094 void InspectorController::stopTimelineProfiler() 1095 { 1096 if (!enabled()) 1097 return; 1098 1099 if (!m_timelineAgent) 1100 return; 1101 1102 m_timelineAgent = 0; 1113 1103 if (m_frontend) 1114 m_frontend->timeline WasDisabled();1115 } 1116 1117 bool InspectorController::timeline Enabled() const1104 m_frontend->timelineProfilerWasStopped(); 1105 } 1106 1107 bool InspectorController::timelineProfilerEnabled() const 1118 1108 { 1119 1109 if (!enabled()) 1120 1110 return false; 1121 1111 1122 return m_timelineAgent .get();1112 return m_timelineAgent; 1123 1113 } 1124 1114 -
trunk/WebCore/inspector/InspectorController.h
r49560 r49565 229 229 void ensureResourceTrackingSettingsLoaded(); 230 230 231 void enableTimeline(bool always = false);232 void disableTimeline(bool always = false);233 bool timeline Enabled() const;231 void startTimelineProfiler(); 232 void stopTimelineProfiler(); 233 bool timelineProfilerEnabled() const; 234 234 InspectorTimelineAgent* timelineAgent() { return m_timelineAgent.get(); } 235 235 -
trunk/WebCore/inspector/InspectorFrontend.cpp
r49560 r49565 198 198 } 199 199 200 void InspectorFrontend::timeline WasEnabled()201 { 202 callSimpleFunction("timeline WasEnabled");203 } 204 205 void InspectorFrontend::timeline WasDisabled()206 { 207 callSimpleFunction("timeline WasDisabled");200 void InspectorFrontend::timelineProfilerWasStarted() 201 { 202 callSimpleFunction("timelineProfilerWasStarted"); 203 } 204 205 void InspectorFrontend::timelineProfilerWasStopped() 206 { 207 callSimpleFunction("timelineProfilerWasStopped"); 208 208 } 209 209 -
trunk/WebCore/inspector/InspectorFrontend.h
r49560 r49565 123 123 void didRemoveNode(int callId, int nodeId); 124 124 125 void timeline WasEnabled();126 void timeline WasDisabled();125 void timelineProfilerWasStarted(); 126 void timelineProfilerWasStopped(); 127 127 void addItemToTimeline(const ScriptObject& itemObj); 128 128 -
trunk/WebCore/inspector/front-end/TimelineAgent.js
r48167 r49565 46 46 } 47 47 48 WebInspector.timeline WasEnabled = function() {48 WebInspector.timelineProfilerWasStarted = function() { 49 49 // Not implemented. 50 50 } 51 51 52 WebInspector.timeline WasDisabled = function() {52 WebInspector.timelineProfilerWasStopped = function() { 53 53 // Not implemented. 54 54 }
Note: See TracChangeset
for help on using the changeset viewer.