| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 } | 645 } |
| 646 appendRecord(TimelineRecordFactory::createTimeStampData(message), TimelineRe
cordType::TimeStamp, true, frameForScriptExecutionContext(context)); | 646 appendRecord(TimelineRecordFactory::createTimeStampData(message), TimelineRe
cordType::TimeStamp, true, frameForScriptExecutionContext(context)); |
| 647 } | 647 } |
| 648 | 648 |
| 649 void InspectorTimelineAgent::consoleTimelineEnd(ScriptExecutionContext* context,
const String& title, ScriptState* state) | 649 void InspectorTimelineAgent::consoleTimelineEnd(ScriptExecutionContext* context,
const String& title, ScriptState* state) |
| 650 { | 650 { |
| 651 if (!m_state->getBoolean(TimelineAgentState::enabled)) | 651 if (!m_state->getBoolean(TimelineAgentState::enabled)) |
| 652 return; | 652 return; |
| 653 | 653 |
| 654 size_t index = m_consoleTimelines.find(title); | 654 size_t index = m_consoleTimelines.find(title); |
| 655 if (index == notFound) { | 655 if (index == kNotFound) { |
| 656 String message = String::format("Timeline '%s' was not started.", title.
utf8().data()); | 656 String message = String::format("Timeline '%s' was not started.", title.
utf8().data()); |
| 657 page()->console().addMessage(ConsoleAPIMessageSource, DebugMessageLevel,
message, String(), 0, 0, 0, state); | 657 page()->console().addMessage(ConsoleAPIMessageSource, DebugMessageLevel,
message, String(), 0, 0, 0, state); |
| 658 return; | 658 return; |
| 659 } | 659 } |
| 660 | 660 |
| 661 String message = String::format("Timeline '%s' finished.", title.utf8().data
()); | 661 String message = String::format("Timeline '%s' finished.", title.utf8().data
()); |
| 662 appendRecord(TimelineRecordFactory::createTimeStampData(message), TimelineRe
cordType::TimeStamp, true, frameForScriptExecutionContext(context)); | 662 appendRecord(TimelineRecordFactory::createTimeStampData(message), TimelineRe
cordType::TimeStamp, true, frameForScriptExecutionContext(context)); |
| 663 m_consoleTimelines.remove(index); | 663 m_consoleTimelines.remove(index); |
| 664 if (!m_consoleTimelines.size() && isStarted() && !m_state->getBoolean(Timeli
neAgentState::startedFromProtocol)) | 664 if (!m_consoleTimelines.size() && isStarted() && !m_state->getBoolean(Timeli
neAgentState::startedFromProtocol)) |
| 665 innerStop(true); | 665 innerStop(true); |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 915 return m_timeConverter.fromMonotonicallyIncreasingTime(WTF::monotonicallyInc
reasingTime()); | 915 return m_timeConverter.fromMonotonicallyIncreasingTime(WTF::monotonicallyInc
reasingTime()); |
| 916 } | 916 } |
| 917 | 917 |
| 918 Page* InspectorTimelineAgent::page() | 918 Page* InspectorTimelineAgent::page() |
| 919 { | 919 { |
| 920 return m_pageAgent ? m_pageAgent->page() : 0; | 920 return m_pageAgent ? m_pageAgent->page() : 0; |
| 921 } | 921 } |
| 922 | 922 |
| 923 } // namespace WebCore | 923 } // namespace WebCore |
| 924 | 924 |
| OLD | NEW |