| 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/scoped_observer.h" | 9 #include "base/scoped_observer.h" |
| 10 #include "extensions/browser/extension_registry_observer.h" | 10 #include "extensions/browser/extension_registry_observer.h" |
| 11 #include "extensions/common/mojo/keep_alive.mojom.h" | 11 #include "extensions/common/mojo/keep_alive.mojom.h" |
| 12 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h" | 12 #include "mojo/public/cpp/bindings/interface_request.h" |
| 13 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h" | 13 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 14 | 14 |
| 15 namespace content { | 15 namespace content { |
| 16 class BrowserContext; | 16 class BrowserContext; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace extensions { | 19 namespace extensions { |
| 20 class Extension; | 20 class Extension; |
| 21 | 21 |
| 22 // An RAII mojo service implementation for extension keep alives. This adds a | 22 // An RAII mojo service implementation for extension keep alives. This adds a |
| 23 // keep alive on construction and removes it on destruction. | 23 // keep alive on construction and removes it on destruction. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 48 const Extension* extension_; | 48 const Extension* extension_; |
| 49 ScopedObserver<ExtensionRegistry, KeepAliveImpl> extension_registry_observer_; | 49 ScopedObserver<ExtensionRegistry, KeepAliveImpl> extension_registry_observer_; |
| 50 mojo::StrongBinding<KeepAlive> binding_; | 50 mojo::StrongBinding<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 |