summaryrefslogtreecommitdiffstats
path: root/extensions/renderer/mojo
diff options
context:
space:
mode:
authorsammc <sammc@chromium.org>2015-05-19 21:55:37 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-20 04:55:43 +0000
commitceff908a1afba3e54c7d6ec133654e5afb4007a6 (patch)
tree6d76e7ea5185a7838f868e39b2de57a89268b573 /extensions/renderer/mojo
parenta6faceeb923420b8f8ec83029ecda0fffac5438f (diff)
downloadchromium_src-ceff908a1afba3e54c7d6ec133654e5afb4007a6.zip
chromium_src-ceff908a1afba3e54c7d6ec133654e5afb4007a6.tar.gz
chromium_src-ceff908a1afba3e54c7d6ec133654e5afb4007a6.tar.bz2
Remove mojo::InterfaceImpl from extensions.
BUG=489751 Review URL: https://codereview.chromium.org/1148703002 Cr-Commit-Position: refs/heads/master@{#330699}
Diffstat (limited to 'extensions/renderer/mojo')
-rw-r--r--extensions/renderer/mojo/keep_alive_client_unittest.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/extensions/renderer/mojo/keep_alive_client_unittest.cc b/extensions/renderer/mojo/keep_alive_client_unittest.cc
index 4f23621..ae170b6 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