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

Unified Diff: extensions/renderer/mojo/keep_alive_client_unittest.cc

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
« no previous file with comments | « extensions/browser/mojo/keep_alive_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/mojo/keep_alive_client_unittest.cc
diff --git a/extensions/renderer/mojo/keep_alive_client_unittest.cc b/extensions/renderer/mojo/keep_alive_client_unittest.cc
index 4f23621eb007bd47073c41689fd964baceacc20e..ae170b6c70df7a1ecdc237f2844f56f164d65282 100644
--- a/extensions/renderer/mojo/keep_alive_client_unittest.cc
+++ b/extensions/renderer/mojo/keep_alive_client_unittest.cc
@@ -5,7 +5,7 @@
#include "extensions/common/mojo/keep_alive.mojom.h"
#include "extensions/renderer/api_test_base.h"
#include "grit/extensions_renderer_resources.h"
-#include "third_party/mojo/src/mojo/public/cpp/bindings/interface_impl.h"
+#include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h"
// A test launcher for tests for the stash client defined in
// extensions/test/data/keep_alive_client_unittest.js.
@@ -15,22 +15,24 @@ namespace {
// A KeepAlive implementation that calls provided callbacks on creation and
// destruction.
-class TestKeepAlive : public mojo::InterfaceImpl<KeepAlive> {
+class TestKeepAlive : public KeepAlive {
public:
- explicit TestKeepAlive(const base::Closure& on_destruction)
- : on_destruction_(on_destruction) {}
+ TestKeepAlive(const base::Closure& on_destruction,
+ mojo::InterfaceRequest<KeepAlive> keep_alive)
+ : on_destruction_(on_destruction), binding_(this, keep_alive.Pass()) {}
~TestKeepAlive() override { on_destruction_.Run(); }
static void Create(const base::Closure& on_creation,
const base::Closure& on_destruction,
mojo::InterfaceRequest<KeepAlive> keep_alive) {
- mojo::BindToRequest(new TestKeepAlive(on_destruction), &keep_alive);
+ new TestKeepAlive(on_destruction, keep_alive.Pass());
on_creation.Run();
}
private:
const base::Closure on_destruction_;
+ mojo::StrongBinding<KeepAlive> binding_;
};
} // namespace
« no previous file with comments | « extensions/browser/mojo/keep_alive_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698