summaryrefslogtreecommitdiffstats
path: root/mojo/examples/compositor_app
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-07 22:41:53 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-07 22:41:53 +0000
commitc8826725c7d1fe6a5cf8d46eae51b226ec4a2359 (patch)
tree4f27fb6424541152472b9b10e6a010d1fe87649c /mojo/examples/compositor_app
parent37ae8a4ebc0593bc0fb8704f5b070b6686f61f02 (diff)
downloadchromium_src-c8826725c7d1fe6a5cf8d46eae51b226ec4a2359.zip
chromium_src-c8826725c7d1fe6a5cf8d46eae51b226ec4a2359.tar.gz
chromium_src-c8826725c7d1fe6a5cf8d46eae51b226ec4a2359.tar.bz2
Mojo: abstract interface implementation from generated Stub classes
Remove RemotePtr<S>::SetPeer method in favor of an optionally NULL second constructor argument. (The reset method also gains an optionally NULL second argument.) R=davemoore@chromium.org Review URL: https://codereview.chromium.org/109103003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243416 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo/examples/compositor_app')
-rw-r--r--mojo/examples/compositor_app/compositor_app.cc10
-rw-r--r--mojo/examples/compositor_app/gles2_client_impl.cc3
-rw-r--r--mojo/examples/compositor_app/gles2_client_impl.h2
3 files changed, 6 insertions, 9 deletions
diff --git a/mojo/examples/compositor_app/compositor_app.cc b/mojo/examples/compositor_app/compositor_app.cc
index 172e4c0..2865fb9 100644
--- a/mojo/examples/compositor_app/compositor_app.cc
+++ b/mojo/examples/compositor_app/compositor_app.cc
@@ -30,11 +30,10 @@
namespace mojo {
namespace examples {
-class SampleApp : public ShellClientStub {
+class SampleApp : public ShellClient {
public:
explicit SampleApp(ScopedMessagePipeHandle shell_handle)
- : shell_(shell_handle.Pass()) {
- shell_.SetPeer(this);
+ : shell_(shell_handle.Pass(), this) {
mojo::ScopedMessagePipeHandle client_handle, native_viewport_handle;
CreateMessagePipe(&client_handle, &native_viewport_handle);
native_viewport_client_.reset(
@@ -48,11 +47,10 @@ class SampleApp : public ShellClientStub {
}
private:
- class NativeViewportClientImpl : public mojo::NativeViewportClientStub {
+ class NativeViewportClientImpl : public mojo::NativeViewportClient {
public:
explicit NativeViewportClientImpl(ScopedMessagePipeHandle viewport_handle)
- : viewport_(viewport_handle.Pass()) {
- viewport_.SetPeer(this);
+ : viewport_(viewport_handle.Pass(), this) {
viewport_->Open();
ScopedMessagePipeHandle gles2_handle;
ScopedMessagePipeHandle gles2_client_handle;
diff --git a/mojo/examples/compositor_app/gles2_client_impl.cc b/mojo/examples/compositor_app/gles2_client_impl.cc
index fecb42d..f6849fd 100644
--- a/mojo/examples/compositor_app/gles2_client_impl.cc
+++ b/mojo/examples/compositor_app/gles2_client_impl.cc
@@ -16,8 +16,7 @@ GLES2ClientImpl::GLES2ClientImpl(
const base::Callback<void(gfx::Size)>& context_created_callback)
: context_created_callback_(context_created_callback),
impl_(NULL),
- service_(pipe.Pass()) {
- service_.SetPeer(this);
+ service_(pipe.Pass(), this) {
}
GLES2ClientImpl::~GLES2ClientImpl() { service_->Destroy(); }
diff --git a/mojo/examples/compositor_app/gles2_client_impl.h b/mojo/examples/compositor_app/gles2_client_impl.h
index b5e4e7e..38d80b5 100644
--- a/mojo/examples/compositor_app/gles2_client_impl.h
+++ b/mojo/examples/compositor_app/gles2_client_impl.h
@@ -23,7 +23,7 @@ class GLES2Implementation;
namespace mojo {
namespace examples {
-class GLES2ClientImpl : public GLES2ClientStub {
+class GLES2ClientImpl : public GLES2Client {
public:
GLES2ClientImpl(
ScopedMessagePipeHandle pipe,