Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(466)

Side by Side Diff: third_party/WebKit/Source/core/inspector/InspectorProfilerAgent.cpp

Issue 1859293002: [DevTools] Move Console to v8_inspector (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 void InspectorProfilerAgent::restore() 74 void InspectorProfilerAgent::restore()
75 { 75 {
76 if (!m_state->booleanProperty(ProfilerAgentState::profilerEnabled, false)) 76 if (!m_state->booleanProperty(ProfilerAgentState::profilerEnabled, false))
77 return; 77 return;
78 m_v8ProfilerAgent->restore(); 78 m_v8ProfilerAgent->restore();
79 ErrorString errorString; 79 ErrorString errorString;
80 enable(&errorString); 80 enable(&errorString);
81 } 81 }
82 82
83 // Protocol implementation.
84 void InspectorProfilerAgent::consoleProfile(ExecutionContext* context, const Str ing16& title)
85 {
86 UseCounter::count(context, UseCounter::DevToolsConsoleProfile);
87 m_v8ProfilerAgent->consoleProfile(title);
88 }
89
90 void InspectorProfilerAgent::consoleProfileEnd(const String16& title)
91 {
92 m_v8ProfilerAgent->consoleProfileEnd(title);
93 }
94
95 void InspectorProfilerAgent::enable(ErrorString* errorString) 83 void InspectorProfilerAgent::enable(ErrorString* errorString)
96 { 84 {
97 m_v8ProfilerAgent->enable(errorString); 85 m_v8ProfilerAgent->enable(errorString);
98 m_state->setBoolean(ProfilerAgentState::profilerEnabled, true); 86 m_state->setBoolean(ProfilerAgentState::profilerEnabled, true);
99 m_instrumentingAgents->setInspectorProfilerAgent(this); 87 m_instrumentingAgents->setInspectorProfilerAgent(this);
100 } 88 }
101 89
102 void InspectorProfilerAgent::disable(ErrorString* errorString) 90 void InspectorProfilerAgent::disable(ErrorString* errorString)
103 { 91 {
104 m_instrumentingAgents->setInspectorProfilerAgent(nullptr); 92 m_instrumentingAgents->setInspectorProfilerAgent(nullptr);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 { 132 {
145 m_v8ProfilerAgent->idleFinished(); 133 m_v8ProfilerAgent->idleFinished();
146 } 134 }
147 135
148 DEFINE_TRACE(InspectorProfilerAgent) 136 DEFINE_TRACE(InspectorProfilerAgent)
149 { 137 {
150 InspectorBaseAgent::trace(visitor); 138 InspectorBaseAgent::trace(visitor);
151 } 139 }
152 140
153 } // namespace blink 141 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698