Changeset 49565 in webkit


Ignore:
Timestamp:
Oct 14, 2009 9:21:06 AM (15 years ago)
Author:
pfeldman@chromium.org
Message:

2009-10-13 Kelly Norton <knorton@google.com>

Reviewed by Pavel Feldman.

Removes the persistent setting for InspectorTimelineAgent and renames timeline related
interfaces to be more consistent with the JavaScript profiler.

  • inspector/InspectorBackend.cpp: (WebCore::InspectorBackend::startTimelineProfiler): (WebCore::InspectorBackend::stopTimelineProfiler): (WebCore::InspectorBackend::timelineProfilerEnabled):
  • inspector/InspectorBackend.h:
  • inspector/InspectorBackend.idl:
  • inspector/InspectorController.cpp: (WebCore::InspectorController::setFrontendProxyObject): (WebCore::InspectorController::startTimelineProfiler): (WebCore::InspectorController::stopTimelineProfiler): (WebCore::InspectorController::timelineProfilerEnabled):
  • inspector/InspectorController.h:
  • inspector/InspectorFrontend.cpp: (WebCore::InspectorFrontend::timelineProfilerWasStarted): (WebCore::InspectorFrontend::timelineProfilerWasStopped):
  • inspector/InspectorFrontend.h:
  • inspector/front-end/TimelineAgent.js: (WebInspector.timelineProfilerWasStarted): (WebInspector.timelineProfilerWasStopped):
Location:
trunk/WebCore
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r49562 r49565  
     12009-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
    1282009-10-01  Yong Li  <yong.li@torchmobile.com>
    229
  • trunk/WebCore/inspector/InspectorBackend.cpp

    r49560 r49565  
    259259}
    260260
    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::timelineEnabled() const
    274 {
    275     if (m_inspectorController)
    276         return m_inspectorController->timelineEnabled();
     261void InspectorBackend::startTimelineProfiler()
     262{
     263    if (m_inspectorController)
     264        m_inspectorController->startTimelineProfiler();
     265}
     266
     267void InspectorBackend::stopTimelineProfiler()
     268{
     269    if (m_inspectorController)
     270        m_inspectorController->stopTimelineProfiler();
     271}
     272
     273bool InspectorBackend::timelineProfilerEnabled() const
     274{
     275    if (m_inspectorController)
     276        return m_inspectorController->timelineProfilerEnabled();
    277277    return false;
    278278}
  • trunk/WebCore/inspector/InspectorBackend.h

    r49560 r49565  
    9696    const String& platform() const;
    9797
    98     void enableTimeline(bool always);
    99     void disableTimeline(bool always);
    100     bool timelineEnabled() const;
     98    void startTimelineProfiler();
     99    void stopTimelineProfiler();
     100    bool timelineProfilerEnabled() const;
    101101
    102102#if ENABLE(JAVASCRIPT_DEBUGGER)
  • trunk/WebCore/inspector/InspectorBackend.idl

    r49560 r49565  
    6262        DOMString hiddenPanels();
    6363        DOMString platform();
    64         void enableTimeline(in boolean always);
    65         void disableTimeline(in boolean always);
    66         boolean timelineEnabled();
     64        void startTimelineProfiler();
     65        void stopTimelineProfiler();
     66        boolean timelineProfilerEnabled();
    6767        [ImplementationFunction=moveWindowBy] void moveByUnrestricted(in float x, in float y);
    6868        void setAttachedWindowHeight(in unsigned long height);
  • trunk/WebCore/inspector/InspectorController.cpp

    r49560 r49565  
    114114static const char* const inspectorAttachedHeightName = "inspectorAttachedHeight";
    115115static const char* const lastActivePanelSettingName = "lastActivePanel";
    116 static const char* const timelineEnabledSettingName = "timelineEnabled";
    117116
    118117static const unsigned defaultAttachedHeight = 300;
     
    555554    m_frontend.set(new InspectorFrontend(this, scriptState, webInspectorObj));
    556555    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;
    561557}
    562558
     
    10831079}
    10841080
    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())
     1081void InspectorController::startTimelineProfiler()
     1082{
     1083    if (!enabled())
     1084        return;
     1085
     1086    if (m_timelineAgent)
    10941087        return;
    10951088
    10961089    m_timelineAgent = new InspectorTimelineAgent(m_frontend.get());
    10971090    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
     1094void InspectorController::stopTimelineProfiler()
     1095{
     1096    if (!enabled())
     1097        return;
     1098
     1099    if (!m_timelineAgent)
     1100        return;
     1101
     1102    m_timelineAgent = 0;
    11131103    if (m_frontend)
    1114         m_frontend->timelineWasDisabled();
    1115 }
    1116 
    1117 bool InspectorController::timelineEnabled() const
     1104        m_frontend->timelineProfilerWasStopped();
     1105}
     1106
     1107bool InspectorController::timelineProfilerEnabled() const
    11181108{
    11191109    if (!enabled())
    11201110        return false;
    11211111
    1122     return m_timelineAgent.get();
     1112    return m_timelineAgent;
    11231113}
    11241114
  • trunk/WebCore/inspector/InspectorController.h

    r49560 r49565  
    229229    void ensureResourceTrackingSettingsLoaded();
    230230
    231     void enableTimeline(bool always = false);
    232     void disableTimeline(bool always = false);
    233     bool timelineEnabled() const;
     231    void startTimelineProfiler();
     232    void stopTimelineProfiler();
     233    bool timelineProfilerEnabled() const;
    234234    InspectorTimelineAgent* timelineAgent() { return m_timelineAgent.get(); }
    235235
  • trunk/WebCore/inspector/InspectorFrontend.cpp

    r49560 r49565  
    198198}
    199199
    200 void InspectorFrontend::timelineWasEnabled()
    201 {
    202     callSimpleFunction("timelineWasEnabled");
    203 }
    204 
    205 void InspectorFrontend::timelineWasDisabled()
    206 {
    207     callSimpleFunction("timelineWasDisabled");
     200void InspectorFrontend::timelineProfilerWasStarted()
     201{
     202    callSimpleFunction("timelineProfilerWasStarted");
     203}
     204
     205void InspectorFrontend::timelineProfilerWasStopped()
     206{
     207    callSimpleFunction("timelineProfilerWasStopped");
    208208}
    209209
  • trunk/WebCore/inspector/InspectorFrontend.h

    r49560 r49565  
    123123        void didRemoveNode(int callId, int nodeId);
    124124
    125         void timelineWasEnabled();
    126         void timelineWasDisabled();
     125        void timelineProfilerWasStarted();
     126        void timelineProfilerWasStopped();
    127127        void addItemToTimeline(const ScriptObject& itemObj);
    128128
  • trunk/WebCore/inspector/front-end/TimelineAgent.js

    r48167 r49565  
    4646}
    4747
    48 WebInspector.timelineWasEnabled = function() {
     48WebInspector.timelineProfilerWasStarted = function() {
    4949    // Not implemented.
    5050}
    5151
    52 WebInspector.timelineWasDisabled = function() {
     52WebInspector.timelineProfilerWasStopped = function() {
    5353    // Not implemented.
    5454}
Note: See TracChangeset for help on using the changeset viewer.