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

Unified Diff: content/browser/service_worker/service_worker_context_watcher.h

Issue 1030103003: Report error messages to DevTools window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporated falken's comment Created 5 years, 9 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/browser/service_worker/service_worker_context_watcher.h
diff --git a/content/browser/service_worker/service_worker_context_watcher.h b/content/browser/service_worker/service_worker_context_watcher.h
index c02728234db4afb105b560f285b201727f3ad01e..f9c8aff0be3035e05546c92a7027df8659560e2c 100644
--- a/content/browser/service_worker/service_worker_context_watcher.h
+++ b/content/browser/service_worker/service_worker_context_watcher.h
@@ -27,10 +27,15 @@ class ServiceWorkerContextWatcher
WorkerRegistrationUpdatedCallback;
typedef base::Callback<void(const std::vector<ServiceWorkerVersionInfo>&)>
WorkerVersionUpdatedCallback;
+ typedef base::Callback<void(int64 /* registration_id */,
+ int64 /* version_id */,
+ const ErrorInfo&)> WorkerErrorReportedCallback;
+
ServiceWorkerContextWatcher(
scoped_refptr<ServiceWorkerContextWrapper> context,
const WorkerRegistrationUpdatedCallback& registration_callback,
- const WorkerVersionUpdatedCallback& version_callback);
+ const WorkerVersionUpdatedCallback& version_callback,
+ const WorkerErrorReportedCallback& error_callback);
void Start();
void Stop();
@@ -66,6 +71,10 @@ class ServiceWorkerContextWatcher
void OnVersionStateChanged(
int64 version_id,
content::ServiceWorkerVersion::Status status) override;
+ void OnErrorReported(int64 version_id,
+ int process_id,
+ int thread_id,
+ const ErrorInfo& info) override;
void OnRegistrationStored(int64 registration_id,
const GURL& pattern) override;
void OnRegistrationDeleted(int64 registration_id,
@@ -75,6 +84,7 @@ class ServiceWorkerContextWatcher
scoped_refptr<ServiceWorkerContextWrapper> context_;
WorkerRegistrationUpdatedCallback registration_callback_;
WorkerVersionUpdatedCallback version_callback_;
+ WorkerErrorReportedCallback error_callback_;
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698