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_
10 namespace extensions
{
13 class ExtensionHostObserver
{
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
22 virtual void OnExtensionMessageDispatched(const ExtensionHost
* host
,
23 const std::string
& event_name
,
26 // Called when a previously dispatched message has been acked by the
27 // RenderView for |host|.
28 virtual void OnExtensionMessageAcked(const ExtensionHost
* host
,
31 // Called when the extension associated with |host| starts a new network
33 virtual void OnNetworkRequestStarted(const ExtensionHost
* host
,
36 // Called when the network request with |request_id| is done.
37 virtual void OnNetworkRequestDone(const ExtensionHost
* host
,
41 } // namespace extensions
43 #endif /* EXTENSIONS_BROWSER_EXTENSION_HOST_OBSERVER_H_ */