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

Unified Diff: mojo/public/tests/bindings_remote_ptr_unittest.cc

Issue 109103003: Mojo: abstract interface implementation from generated Stub classes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase + fix build Created 6 years, 11 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 | « mojo/public/tests/bindings_handle_passing_unittest.cc ('k') | mojo/services/gles2/gles2_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/tests/bindings_remote_ptr_unittest.cc
diff --git a/mojo/public/tests/bindings_remote_ptr_unittest.cc b/mojo/public/tests/bindings_remote_ptr_unittest.cc
index beada47290ff44f406229dcdcdc942c56c54ccaa..0d52224221c5bc9e3b3be4402ad19e4110fe1fe2 100644
--- a/mojo/public/tests/bindings_remote_ptr_unittest.cc
+++ b/mojo/public/tests/bindings_remote_ptr_unittest.cc
@@ -10,14 +10,13 @@
namespace mojo {
namespace test {
-class MathCalculatorImpl : public math::CalculatorStub {
+class MathCalculatorImpl : public math::Calculator {
public:
virtual ~MathCalculatorImpl() {}
explicit MathCalculatorImpl(ScopedMessagePipeHandle pipe)
- : ui_(pipe.Pass()),
+ : ui_(pipe.Pass(), this),
total_(0.0) {
- ui_.SetPeer(this);
}
virtual void Clear() MOJO_OVERRIDE {
@@ -39,12 +38,11 @@ class MathCalculatorImpl : public math::CalculatorStub {
double total_;
};
-class MathCalculatorUIImpl : public math::CalculatorUIStub {
+class MathCalculatorUIImpl : public math::CalculatorUI {
public:
explicit MathCalculatorUIImpl(ScopedMessagePipeHandle pipe)
- : calculator_(pipe.Pass()),
+ : calculator_(pipe.Pass(), this),
output_(0.0) {
- calculator_.SetPeer(this);
}
bool encountered_error() const {
@@ -119,7 +117,7 @@ TEST_F(BindingsRemotePtrTest, EndToEnd) {
TEST_F(BindingsRemotePtrTest, Movable) {
RemotePtr<math::Calculator> a;
- RemotePtr<math::Calculator> b(pipe0_.Pass());
+ RemotePtr<math::Calculator> b(pipe0_.Pass(), NULL);
EXPECT_TRUE(a.is_null());
EXPECT_FALSE(b.is_null());
@@ -137,7 +135,7 @@ TEST_F(BindingsRemotePtrTest, Resettable) {
MessagePipeHandle handle = pipe0_.get();
- a.reset(pipe0_.Pass());
+ a.reset(pipe0_.Pass(), NULL);
EXPECT_FALSE(a.is_null());
« no previous file with comments | « mojo/public/tests/bindings_handle_passing_unittest.cc ('k') | mojo/services/gles2/gles2_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698