| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Google Inc. All rights reserved. | 3 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 | 78 |
| 79 void InspectorProfilerAgent::restore() | 79 void InspectorProfilerAgent::restore() |
| 80 { | 80 { |
| 81 if (!m_state->booleanProperty(ProfilerAgentState::profilerEnabled, false)) | 81 if (!m_state->booleanProperty(ProfilerAgentState::profilerEnabled, false)) |
| 82 return; | 82 return; |
| 83 m_v8ProfilerAgent->restore(); | 83 m_v8ProfilerAgent->restore(); |
| 84 ErrorString errorString; | 84 ErrorString errorString; |
| 85 enable(&errorString); | 85 enable(&errorString); |
| 86 } | 86 } |
| 87 | 87 |
| 88 // Protocol implementation. | |
| 89 void InspectorProfilerAgent::consoleProfile(ExecutionContext* context, const Str
ing16& title) | |
| 90 { | |
| 91 UseCounter::count(context, UseCounter::DevToolsConsoleProfile); | |
| 92 m_v8ProfilerAgent->consoleProfile(title); | |
| 93 } | |
| 94 | |
| 95 void InspectorProfilerAgent::consoleProfileEnd(const String16& title) | |
| 96 { | |
| 97 m_v8ProfilerAgent->consoleProfileEnd(title); | |
| 98 } | |
| 99 | |
| 100 void InspectorProfilerAgent::enable(ErrorString* errorString) | 88 void InspectorProfilerAgent::enable(ErrorString* errorString) |
| 101 { | 89 { |
| 102 m_v8ProfilerAgent->enable(errorString); | 90 m_v8ProfilerAgent->enable(errorString); |
| 103 m_state->setBoolean(ProfilerAgentState::profilerEnabled, true); | 91 m_state->setBoolean(ProfilerAgentState::profilerEnabled, true); |
| 104 m_instrumentingAgents->setInspectorProfilerAgent(this); | 92 m_instrumentingAgents->setInspectorProfilerAgent(this); |
| 105 } | 93 } |
| 106 | 94 |
| 107 void InspectorProfilerAgent::disable(ErrorString* errorString) | 95 void InspectorProfilerAgent::disable(ErrorString* errorString) |
| 108 { | 96 { |
| 109 m_instrumentingAgents->setInspectorProfilerAgent(nullptr); | 97 m_instrumentingAgents->setInspectorProfilerAgent(nullptr); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 { | 137 { |
| 150 m_v8ProfilerAgent->idleFinished(); | 138 m_v8ProfilerAgent->idleFinished(); |
| 151 } | 139 } |
| 152 | 140 |
| 153 DEFINE_TRACE(InspectorProfilerAgent) | 141 DEFINE_TRACE(InspectorProfilerAgent) |
| 154 { | 142 { |
| 155 InspectorBaseAgent::trace(visitor); | 143 InspectorBaseAgent::trace(visitor); |
| 156 } | 144 } |
| 157 | 145 |
| 158 } // namespace blink | 146 } // namespace blink |
| OLD | NEW |