| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_HOST_OBSERVER_H_ | 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_HOST_OBSERVER_H_ |
| 6 #define EXTENSIONS_BROWSER_EXTENSION_HOST_OBSERVER_H_ | 6 #define EXTENSIONS_BROWSER_EXTENSION_HOST_OBSERVER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 8 #include <string> | 10 #include <string> |
| 9 | 11 |
| 10 namespace extensions { | 12 namespace extensions { |
| 11 class ExtensionHost; | 13 class ExtensionHost; |
| 12 | 14 |
| 13 class ExtensionHostObserver { | 15 class ExtensionHostObserver { |
| 14 public: | 16 public: |
| 15 virtual ~ExtensionHostObserver() {} | 17 virtual ~ExtensionHostObserver() {} |
| 16 | 18 |
| 17 // TODO(kalman): Why do these all return const ExtensionHosts? It seems | 19 // TODO(kalman): Why do these all return const ExtensionHosts? It seems |
| (...skipping 10 matching lines...) Expand all Loading... |
| 28 int event_id) {} | 30 int event_id) {} |
| 29 | 31 |
| 30 // Called when a previously dispatched message has been acked by the | 32 // Called when a previously dispatched message has been acked by the |
| 31 // event page for |host|. | 33 // event page for |host|. |
| 32 virtual void OnBackgroundEventAcked(const ExtensionHost* host, int event_id) { | 34 virtual void OnBackgroundEventAcked(const ExtensionHost* host, int event_id) { |
| 33 } | 35 } |
| 34 | 36 |
| 35 // Called when the extension associated with |host| starts a new network | 37 // Called when the extension associated with |host| starts a new network |
| 36 // request. | 38 // request. |
| 37 virtual void OnNetworkRequestStarted(const ExtensionHost* host, | 39 virtual void OnNetworkRequestStarted(const ExtensionHost* host, |
| 38 uint64 request_id) {} | 40 uint64_t request_id) {} |
| 39 | 41 |
| 40 // Called when the network request with |request_id| is done. | 42 // Called when the network request with |request_id| is done. |
| 41 virtual void OnNetworkRequestDone(const ExtensionHost* host, | 43 virtual void OnNetworkRequestDone(const ExtensionHost* host, |
| 42 uint64 request_id) {} | 44 uint64_t request_id) {} |
| 43 }; | 45 }; |
| 44 | 46 |
| 45 } // namespace extensions | 47 } // namespace extensions |
| 46 | 48 |
| 47 #endif /* EXTENSIONS_BROWSER_EXTENSION_HOST_OBSERVER_H_ */ | 49 #endif /* EXTENSIONS_BROWSER_EXTENSION_HOST_OBSERVER_H_ */ |
| OLD | NEW |