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

Unified Diff: webkit/glue/webdevtoolsagent_impl.cc

Issue 99121: Merge WebKit console and load deferrer changes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/webdevtoolsagent_impl.h ('k') | webkit/webkit.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webdevtoolsagent_impl.cc
===================================================================
--- webkit/glue/webdevtoolsagent_impl.cc (revision 14719)
+++ webkit/glue/webdevtoolsagent_impl.cc (working copy)
@@ -81,10 +81,9 @@
// Populate console.
for (Vector<ConsoleMessage>::iterator it = console_log_.begin();
it != console_log_.end(); ++it) {
- tools_agent_delegate_stub_->AddMessageToConsole(
- it->message,
- it->source_id,
- it->line_no);
+ DictionaryValue message;
+ Serialize(*it, &message);
+ tools_agent_delegate_stub_->AddMessageToConsole(message);
}
net_agent_impl_->Attach();
@@ -137,20 +136,21 @@
}
void WebDevToolsAgentImpl::AddMessageToConsole(
- const String& message,
- const String& source_id,
- unsigned int line_no) {
- ConsoleMessage cm(message, source_id, line_no);
+ int source,
+ int level,
+ const String& text,
+ unsigned int line_no,
+ const String& source_id) {
+ ConsoleMessage cm(source, level, text, line_no, source_id);
console_log_.append(cm);
if (console_log_.size() >= kMaxConsoleMessages) {
// Batch shifts to save ticks.
console_log_.remove(0, kMaxConsoleMessages / 5);
}
if (attached_) {
- tools_agent_delegate_stub_->AddMessageToConsole(
- message,
- source_id,
- line_no);
+ DictionaryValue message;
+ Serialize(cm, &message);
+ tools_agent_delegate_stub_->AddMessageToConsole(message);
}
}
@@ -249,6 +249,17 @@
}
// static
+void WebDevToolsAgentImpl::Serialize(const ConsoleMessage& message,
+ DictionaryValue* value) {
+ value->SetInteger(L"source", message.source);
+ value->SetInteger(L"level", message.level);
+ value->SetString(L"text", webkit_glue::StringToStdString(message.text));
+ value->SetString(L"sourceId",
+ webkit_glue::StringToStdString(message.source_id));
+ value->SetInteger(L"line", message.line_no);
+}
+
+// static
void WebDevToolsAgent::ExecuteDebuggerCommand(
const std::string& command,
int caller_id) {
@@ -260,3 +271,4 @@
MessageLoopDispatchHandler handler) {
DebuggerAgentManager::SetMessageLoopDispatchHandler(handler);
}
+
« no previous file with comments | « webkit/glue/webdevtoolsagent_impl.h ('k') | webkit/webkit.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698