OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_MOJO_KEEP_ALIVE_IMPL_H_ | 5 #ifndef EXTENSIONS_BROWSER_MOJO_KEEP_ALIVE_IMPL_H_ |
6 #define EXTENSIONS_BROWSER_MOJO_KEEP_ALIVE_IMPL_H_ | 6 #define EXTENSIONS_BROWSER_MOJO_KEEP_ALIVE_IMPL_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/scoped_observer.h" | 10 #include "base/scoped_observer.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 private: | 32 private: |
33 KeepAliveImpl(content::BrowserContext* context, | 33 KeepAliveImpl(content::BrowserContext* context, |
34 const Extension* extension, | 34 const Extension* extension, |
35 KeepAliveRequest request); | 35 KeepAliveRequest request); |
36 ~KeepAliveImpl() override; | 36 ~KeepAliveImpl() override; |
37 | 37 |
38 // ExtensionRegistryObserver overrides. | 38 // ExtensionRegistryObserver overrides. |
39 void OnExtensionUnloaded(content::BrowserContext* browser_context, | 39 void OnExtensionUnloaded(content::BrowserContext* browser_context, |
40 const Extension* extension, | 40 const Extension* extension, |
41 UnloadedExtensionInfo::Reason reason) override; | 41 UnloadedExtensionReason reason) override; |
42 void OnShutdown(ExtensionRegistry* registry) override; | 42 void OnShutdown(ExtensionRegistry* registry) override; |
43 | 43 |
44 // Invoked when the mojo connection is disconnected. | 44 // Invoked when the mojo connection is disconnected. |
45 void OnDisconnected(); | 45 void OnDisconnected(); |
46 | 46 |
47 content::BrowserContext* context_; | 47 content::BrowserContext* context_; |
48 const Extension* extension_; | 48 const Extension* extension_; |
49 ScopedObserver<ExtensionRegistry, KeepAliveImpl> extension_registry_observer_; | 49 ScopedObserver<ExtensionRegistry, KeepAliveImpl> extension_registry_observer_; |
50 mojo::Binding<KeepAlive> binding_; | 50 mojo::Binding<KeepAlive> binding_; |
51 | 51 |
52 DISALLOW_COPY_AND_ASSIGN(KeepAliveImpl); | 52 DISALLOW_COPY_AND_ASSIGN(KeepAliveImpl); |
53 }; | 53 }; |
54 | 54 |
55 } // namespace extensions | 55 } // namespace extensions |
56 | 56 |
57 #endif // EXTENSIONS_BROWSER_MOJO_KEEP_ALIVE_IMPL_H_ | 57 #endif // EXTENSIONS_BROWSER_MOJO_KEEP_ALIVE_IMPL_H_ |
OLD | NEW |