Chromium Code Reviews (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out

Unified Diff: content/public/browser/web_contents_observer.h

Issue 23007021: Report Javascript Runtime Errors to the Error Console (Closed) Base URL:
Patch Set: Created 7 years, 4 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
Index: content/public/browser/web_contents_observer.h
diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h
index d46f3152968ece8a631fbf7250443e37f7857a12..eb0417cb2f1f4b02ce08e928e3f433acbc9580f0 100644
--- a/content/public/browser/web_contents_observer.h
+++ b/content/public/browser/web_contents_observer.h
@@ -5,6 +5,7 @@
+#include "base/logging.h"
#include "base/process/kill.h"
#include "base/process/process_handle.h"
#include "content/common/content_export.h"
@@ -265,6 +266,14 @@ class CONTENT_EXPORT WebContentsObserver : public IPC::Listener,
// Invoked when a user cancels a before unload dialog.
virtual void BeforeUnloadDialogCancelled() {}
+ // Invoked when a message is added to the console. This includes errors, logs,
+ // warnings, and exceptions.
+ virtual void OnMessageAddedToConsole(const base::string16& source,
+ const base::string16& message,
+ const base::string16& stack_trace,
+ int32 line_number,
+ logging::LogSeverity level) {}
// IPC::Listener implementation.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;

Powered by Google App Engine
This is Rietveld 408576698