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

Unified Diff: extensions/renderer/console.h

Issue 2819683002: [Extenisons Bindings] Don't throw unchecked errors; add console errors (Closed)
Patch Set: jbroman's Created 3 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 | « extensions/renderer/api_request_handler_unittest.cc ('k') | extensions/renderer/console.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/console.h
diff --git a/extensions/renderer/console.h b/extensions/renderer/console.h
index 21eb56c11366fcb8ab65c5991c04861851d60fc4..52402b01ca5b68068d0e5edfdea4dcba30061147 100644
--- a/extensions/renderer/console.h
+++ b/extensions/renderer/console.h
@@ -10,23 +10,20 @@
#include "content/public/common/console_message_level.h"
#include "v8/include/v8.h"
-namespace content {
-class RenderFrame;
-}
-
namespace extensions {
+class ScriptContext;
-// Utility for logging messages to RenderFrames.
+// Utility for logging console messages.
namespace console {
-// Adds |message| to the console of |render_frame|. If |render_frame| is null,
-// LOG()s the message instead.
-void AddMessage(content::RenderFrame* render_frame,
+// Adds |message| to the console of of the |script_context|. If |script_context|
+// is null, LOG()s the message instead.
+void AddMessage(ScriptContext* script_context,
content::ConsoleMessageLevel level,
const std::string& message);
// Logs an Error then crashes the current process.
-void Fatal(content::RenderFrame* render_frame, const std::string& message);
+void Fatal(ScriptContext* context, const std::string& message);
// Returns a new v8::Object with each standard log method (Debug/Log/Warn/Error)
// bound to respective debug/log/warn/error methods. This is a direct drop-in
« no previous file with comments | « extensions/renderer/api_request_handler_unittest.cc ('k') | extensions/renderer/console.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698