Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(804)

Unified Diff: extensions/browser/mojo/keep_alive_impl.h

Issue 1148703002: Remove mojo::InterfaceImpl from extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/browser/mojo/keep_alive_impl.h
diff --git a/extensions/browser/mojo/keep_alive_impl.h b/extensions/browser/mojo/keep_alive_impl.h
index 09473e27bcd2d3f6b5f255d4f4646002be2a438a..58108b89a015382b44619a6807d8a26d4fabd004 100644
--- a/extensions/browser/mojo/keep_alive_impl.h
+++ b/extensions/browser/mojo/keep_alive_impl.h
@@ -8,6 +8,7 @@
#include "base/callback.h"
#include "extensions/common/mojo/keep_alive.mojom.h"
#include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h"
+#include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h"
namespace content {
class BrowserContext;
@@ -18,7 +19,7 @@ class Extension;
// An RAII mojo service implementation for extension keep alives. This adds a
// keep alive on construction and removes it on destruction.
-class KeepAliveImpl : public mojo::InterfaceImpl<KeepAlive> {
+class KeepAliveImpl : public KeepAlive {
public:
// Create a keep alive for |extension| running in |context| and connect it to
// |request|. When the requester closes its pipe, the keep alive ends.
@@ -27,11 +28,14 @@ class KeepAliveImpl : public mojo::InterfaceImpl<KeepAlive> {
mojo::InterfaceRequest<KeepAlive> request);
private:
- KeepAliveImpl(content::BrowserContext* context, const Extension* extension);
+ KeepAliveImpl(content::BrowserContext* context,
+ const Extension* extension,
+ mojo::InterfaceRequest<KeepAlive> request);
~KeepAliveImpl() override;
content::BrowserContext* context_;
const Extension* extension_;
+ mojo::StrongBinding<KeepAlive> binding_;
DISALLOW_COPY_AND_ASSIGN(KeepAliveImpl);
};

Powered by Google App Engine
This is Rietveld 408576698