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

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

Issue 23007021: Report Javascript Runtime Errors to the Error Console (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dc_ec_feldman
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 @@
#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,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