Suppress a Valgrind report.
[chromium-blink-merge.git] / extensions / browser / extension_host_observer.h
blobf8086f61bb41e5dcf9b15712bfaa8b1f1ed8deef
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef EXTENSIONS_BROWSER_EXTENSION_HOST_OBSERVER_H_
6 #define EXTENSIONS_BROWSER_EXTENSION_HOST_OBSERVER_H_
8 #include <string>
10 namespace extensions {
11 class ExtensionHost;
13 class ExtensionHostObserver {
14 public:
15 virtual ~ExtensionHostObserver() {}
17 // Called when an ExtensionHost is destroyed.
18 virtual void OnExtensionHostDestroyed(const ExtensionHost* host) {}
20 // Called when a message has been disptached to the RenderView corresponding
21 // to |host|.
22 virtual void OnExtensionMessageDispatched(const ExtensionHost* host,
23 const std::string& event_name,
24 int message_id) {}
26 // Called when a previously dispatched message has been acked by the
27 // RenderView for |host|.
28 virtual void OnExtensionMessageAcked(const ExtensionHost* host,
29 int message_id) {}
31 // Called when the extension associated with |host| starts a new network
32 // request.
33 virtual void OnNetworkRequestStarted(const ExtensionHost* host,
34 uint64 request_id) {}
36 // Called when the network request with |request_id| is done.
37 virtual void OnNetworkRequestDone(const ExtensionHost* host,
38 uint64 request_id) {}
41 } // namespace extensions
43 #endif /* EXTENSIONS_BROWSER_EXTENSION_HOST_OBSERVER_H_ */