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

Unified Diff: extensions/browser/extension_host_observer.h

Issue 823703004: Tracking push events for lucid sleep (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Kill renderer if it sends a bad message id Created 5 years, 11 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: extensions/browser/extension_host_observer.h
diff --git a/extensions/browser/extension_host_observer.h b/extensions/browser/extension_host_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..f8086f61bb41e5dcf9b15712bfaa8b1f1ed8deef
--- /dev/null
+++ b/extensions/browser/extension_host_observer.h
@@ -0,0 +1,43 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef EXTENSIONS_BROWSER_EXTENSION_HOST_OBSERVER_H_
+#define EXTENSIONS_BROWSER_EXTENSION_HOST_OBSERVER_H_
+
+#include <string>
+
+namespace extensions {
+class ExtensionHost;
+
+class ExtensionHostObserver {
+ public:
+ virtual ~ExtensionHostObserver() {}
+
+ // Called when an ExtensionHost is destroyed.
+ virtual void OnExtensionHostDestroyed(const ExtensionHost* host) {}
+
+ // Called when a message has been disptached to the RenderView corresponding
+ // to |host|.
+ virtual void OnExtensionMessageDispatched(const ExtensionHost* host,
+ const std::string& event_name,
+ int message_id) {}
+
+ // Called when a previously dispatched message has been acked by the
+ // RenderView for |host|.
+ virtual void OnExtensionMessageAcked(const ExtensionHost* host,
+ int message_id) {}
+
+ // Called when the extension associated with |host| starts a new network
+ // request.
+ virtual void OnNetworkRequestStarted(const ExtensionHost* host,
+ uint64 request_id) {}
+
+ // Called when the network request with |request_id| is done.
+ virtual void OnNetworkRequestDone(const ExtensionHost* host,
+ uint64 request_id) {}
+};
+
+} // namespace extensions
+
+#endif /* EXTENSIONS_BROWSER_EXTENSION_HOST_OBSERVER_H_ */

Powered by Google App Engine
This is Rietveld 408576698