summaryrefslogtreecommitdiffstats
path: root/webkit/glue/devtools/debugger_agent_impl.cc
diff options
context:
space:
mode:
authormnaganov@chromium.org <mnaganov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-14 09:57:29 +0000
committermnaganov@chromium.org <mnaganov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-14 09:57:29 +0000
commit81c78ac1f4407d0a9b1fa1dbb41916ababa225c7 (patch)
treecedf04cdde1afa84d9617ba1faffcbf7198c200d /webkit/glue/devtools/debugger_agent_impl.cc
parent95575b9f2bfff83e75889f038e6c03fb7ff13471 (diff)
downloadchromium_src-81c78ac1f4407d0a9b1fa1dbb41916ababa225c7.zip
chromium_src-81c78ac1f4407d0a9b1fa1dbb41916ababa225c7.tar.gz
chromium_src-81c78ac1f4407d0a9b1fa1dbb41916ababa225c7.tar.bz2
Add initial version of DevTools Profiler.
To activate it, run Chromium with the following additional js-flags: "--prof --noprof_auto --logfile=*" Review URL: http://codereview.chromium.org/115299 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16052 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/devtools/debugger_agent_impl.cc')
-rw-r--r--webkit/glue/devtools/debugger_agent_impl.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/webkit/glue/devtools/debugger_agent_impl.cc b/webkit/glue/devtools/debugger_agent_impl.cc
index 7dabb61..3d18bb5 100644
--- a/webkit/glue/devtools/debugger_agent_impl.cc
+++ b/webkit/glue/devtools/debugger_agent_impl.cc
@@ -58,11 +58,31 @@ void DebuggerAgentImpl::GetContextId() {
delegate_->DidGetContextId(webdevtools_agent_->host_id());
}
+void DebuggerAgentImpl::StartProfiling() {
+ v8::V8::ResumeProfiler();
+}
+
+void DebuggerAgentImpl::StopProfiling() {
+ v8::V8::PauseProfiler();
+}
+
+void DebuggerAgentImpl::GetLogLines(int position) {
+ static char buffer[65536];
+ int read_size = v8::V8::GetLogLines(position, buffer, sizeof(buffer) - 1);
+ buffer[read_size] = '\0';
+ DidGetLogLines(buffer, position + read_size);
+}
+
void DebuggerAgentImpl::DebuggerOutput(const std::string& command) {
delegate_->DebuggerOutput(command);
webdevtools_agent_->ForceRepaint();
}
+void DebuggerAgentImpl::DidGetLogLines(
+ const std::string& log, int new_position) {
+ delegate_->DidGetLogLines(log, new_position);
+}
+
// static
void DebuggerAgentImpl::ResetUtilityContext(
Document* document,