| OLD | NEW |
| 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 */ | 23 */ |
| 24 | 24 |
| 25 | 25 |
| 26 #include "config.h" | 26 #include "config.h" |
| 27 #include "core/inspector/InspectorConsoleAgent.h" | 27 #include "core/inspector/InspectorConsoleAgent.h" |
| 28 | 28 |
| 29 #include "bindings/core/v8/ScriptCallStackFactory.h" | 29 #include "bindings/core/v8/ScriptCallStackFactory.h" |
| 30 #include "bindings/core/v8/ScriptController.h" | 30 #include "bindings/core/v8/ScriptController.h" |
| 31 #include "bindings/core/v8/ScriptProfiler.h" | 31 #include "bindings/core/v8/ScriptProfiler.h" |
| 32 #include "core/frame/LocalFrame.h" | 32 #include "core/frame/LocalFrame.h" |
| 33 #include "core/frame/UseCounter.h" |
| 33 #include "core/inspector/InjectedScriptHost.h" | 34 #include "core/inspector/InjectedScriptHost.h" |
| 34 #include "core/inspector/InjectedScriptManager.h" | 35 #include "core/inspector/InjectedScriptManager.h" |
| 35 #include "core/inspector/InspectorConsoleMessage.h" | 36 #include "core/inspector/InspectorConsoleMessage.h" |
| 36 #include "core/inspector/InspectorState.h" | 37 #include "core/inspector/InspectorState.h" |
| 37 #include "core/inspector/InspectorTimelineAgent.h" | 38 #include "core/inspector/InspectorTimelineAgent.h" |
| 38 #include "core/inspector/InspectorTracingAgent.h" | 39 #include "core/inspector/InspectorTracingAgent.h" |
| 39 #include "core/inspector/InstrumentingAgents.h" | 40 #include "core/inspector/InstrumentingAgents.h" |
| 40 #include "core/inspector/ScriptArguments.h" | 41 #include "core/inspector/ScriptArguments.h" |
| 41 #include "core/inspector/ScriptCallFrame.h" | 42 #include "core/inspector/ScriptCallFrame.h" |
| 42 #include "core/inspector/ScriptCallStack.h" | 43 #include "core/inspector/ScriptCallStack.h" |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 addConsoleAPIMessageToConsole(LogMessageType, DebugMessageLevel, message, sc
riptState, nullptr); | 233 addConsoleAPIMessageToConsole(LogMessageType, DebugMessageLevel, message, sc
riptState, nullptr); |
| 233 } | 234 } |
| 234 | 235 |
| 235 void InspectorConsoleAgent::setTracingBasedTimeline(ErrorString*, bool enabled) | 236 void InspectorConsoleAgent::setTracingBasedTimeline(ErrorString*, bool enabled) |
| 236 { | 237 { |
| 237 m_state->setBoolean(ConsoleAgentState::tracingBasedTimeline, enabled); | 238 m_state->setBoolean(ConsoleAgentState::tracingBasedTimeline, enabled); |
| 238 } | 239 } |
| 239 | 240 |
| 240 void InspectorConsoleAgent::consoleTimeline(ExecutionContext* context, const Str
ing& title, ScriptState* scriptState) | 241 void InspectorConsoleAgent::consoleTimeline(ExecutionContext* context, const Str
ing& title, ScriptState* scriptState) |
| 241 { | 242 { |
| 243 UseCounter::count(context, UseCounter::DevToolsConsoleTimeline); |
| 242 if (m_tracingAgent && m_state->getBoolean(ConsoleAgentState::tracingBasedTim
eline)) | 244 if (m_tracingAgent && m_state->getBoolean(ConsoleAgentState::tracingBasedTim
eline)) |
| 243 m_tracingAgent->consoleTimeline(title); | 245 m_tracingAgent->consoleTimeline(title); |
| 244 else | 246 else |
| 245 m_timelineAgent->consoleTimeline(context, title, scriptState); | 247 m_timelineAgent->consoleTimeline(context, title, scriptState); |
| 246 } | 248 } |
| 247 | 249 |
| 248 void InspectorConsoleAgent::consoleTimelineEnd(ExecutionContext* context, const
String& title, ScriptState* scriptState) | 250 void InspectorConsoleAgent::consoleTimelineEnd(ExecutionContext* context, const
String& title, ScriptState* scriptState) |
| 249 { | 251 { |
| 250 if (m_state->getBoolean(ConsoleAgentState::tracingBasedTimeline)) | 252 if (m_state->getBoolean(ConsoleAgentState::tracingBasedTimeline)) |
| 251 m_tracingAgent->consoleTimelineEnd(title); | 253 m_tracingAgent->consoleTimelineEnd(title); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 int m_heapObjectId; | 348 int m_heapObjectId; |
| 347 }; | 349 }; |
| 348 | 350 |
| 349 void InspectorConsoleAgent::addInspectedHeapObject(ErrorString*, int inspectedHe
apObjectId) | 351 void InspectorConsoleAgent::addInspectedHeapObject(ErrorString*, int inspectedHe
apObjectId) |
| 350 { | 352 { |
| 351 m_injectedScriptManager->injectedScriptHost()->addInspectedObject(adoptPtr(n
ew InspectableHeapObject(inspectedHeapObjectId))); | 353 m_injectedScriptManager->injectedScriptHost()->addInspectedObject(adoptPtr(n
ew InspectableHeapObject(inspectedHeapObjectId))); |
| 352 } | 354 } |
| 353 | 355 |
| 354 } // namespace blink | 356 } // namespace blink |
| 355 | 357 |
| OLD | NEW |