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

Unified Diff: content/renderer/devtools/devtools_agent.cc

Issue 1890513004: Remove dependency on the DevTools agent for console logs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reuse current console log call but removed devtools agent dependency. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/devtools/devtools_agent.h ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/devtools/devtools_agent.cc
diff --git a/content/renderer/devtools/devtools_agent.cc b/content/renderer/devtools/devtools_agent.cc
index 9d638d575897691711ab8bb375c9d7fa69bfb3b6..78dcd5a01ff0f59dc2bcf07b5f502d4790e97b03 100644
--- a/content/renderer/devtools/devtools_agent.cc
+++ b/content/renderer/devtools/devtools_agent.cc
@@ -21,11 +21,9 @@
#include "ipc/ipc_channel.h"
#include "third_party/WebKit/public/platform/WebPoint.h"
#include "third_party/WebKit/public/platform/WebString.h"
-#include "third_party/WebKit/public/web/WebConsoleMessage.h"
#include "third_party/WebKit/public/web/WebDevToolsAgent.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
-using blink::WebConsoleMessage;
using blink::WebDevToolsAgent;
using blink::WebDevToolsAgentClient;
using blink::WebLocalFrame;
@@ -245,29 +243,6 @@ void DevToolsAgent::OnRequestNewWindowACK(bool success) {
GetWebAgent()->failedToRequestDevTools();
}
-void DevToolsAgent::AddMessageToConsole(ConsoleMessageLevel level,
- const std::string& message) {
- WebLocalFrame* web_frame = frame_->GetWebFrame();
-
- WebConsoleMessage::Level target_level = WebConsoleMessage::LevelLog;
- switch (level) {
- case CONSOLE_MESSAGE_LEVEL_DEBUG:
- target_level = WebConsoleMessage::LevelDebug;
- break;
- case CONSOLE_MESSAGE_LEVEL_LOG:
- target_level = WebConsoleMessage::LevelLog;
- break;
- case CONSOLE_MESSAGE_LEVEL_WARNING:
- target_level = WebConsoleMessage::LevelWarning;
- break;
- case CONSOLE_MESSAGE_LEVEL_ERROR:
- target_level = WebConsoleMessage::LevelError;
- break;
- }
- web_frame->addMessageToConsole(
- WebConsoleMessage(target_level, WebString::fromUTF8(message)));
-}
-
void DevToolsAgent::ContinueProgram() {
GetWebAgent()->continueProgram();
}
« no previous file with comments | « content/renderer/devtools/devtools_agent.h ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698