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..d80a4c66c578de92a761f6aad52ea419b4d50328 100644 |
--- a/content/public/browser/web_contents_observer.h |
+++ b/content/public/browser/web_contents_observer.h |
@@ -5,6 +5,7 @@ |
#ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
#define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
+#include "base/logging.h" |
#include "base/process/kill.h" |
#include "base/process/process_handle.h" |
#include "content/common/content_export.h" |
@@ -265,6 +266,18 @@ 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. |source| is the WebKit-reported source of the |
+ // error (which can be either external or internal), |message| is the error |
+ // message, and |stack_trace| is an optional stack trace of the error in a |
+ // human-readable format (each frame is formatted as |
+ // "\n at function_name (source:line_number:column_number)"). |
+ 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; |