WebContent: Move console handling from WebContentCC to InspectorCC

The idea originally was that the WebContentConsoleClient would perform
some amount of console handling that both InspectorConsoleClient and
DevToolsConsoleClient needed. But in implementing the DevTools console,
it's become clear that these implementations will not overlap at all. So
this patch moves the existing Inspector functionality away from
WebContentConsoleClient.
This commit is contained in:
Timothy Flynn 2025-03-03 16:12:49 -05:00 committed by Tim Flynn
commit 14a8ffa867
Notes: github-actions[bot] 2025-03-04 20:35:05 +00:00
5 changed files with 53 additions and 60 deletions

View file

@ -54,33 +54,4 @@ void WebContentConsoleClient::handle_input(StringView js_source)
}
}
void WebContentConsoleClient::print_html(String const& line)
{
m_message_log.append({ .type = ConsoleOutput::Type::HTML, .data = line });
m_client->did_output_js_console_message(m_message_log.size() - 1);
}
void WebContentConsoleClient::clear()
{
clear_output();
}
void WebContentConsoleClient::clear_output()
{
m_message_log.append({ .type = ConsoleOutput::Type::Clear, .data = String {} });
m_client->did_output_js_console_message(m_message_log.size() - 1);
}
void WebContentConsoleClient::begin_group(String const& label, bool start_expanded)
{
m_message_log.append({ .type = start_expanded ? ConsoleOutput::Type::BeginGroup : ConsoleOutput::Type::BeginGroupCollapsed, .data = label });
m_client->did_output_js_console_message(m_message_log.size() - 1);
}
void WebContentConsoleClient::end_group()
{
m_message_log.append({ .type = ConsoleOutput::Type::EndGroup, .data = String {} });
m_client->did_output_js_console_message(m_message_log.size() - 1);
}
}