diff options
author | abarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-28 02:39:06 +0000 |
---|---|---|
committer | abarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-28 02:39:06 +0000 |
commit | 10c6f09565830cbee5b1405d9b2c2689fb6d1c6c (patch) | |
tree | 83dd6cac42646e91c02c129af2d053f7a80c1b2e /mojo/examples/sample_app/native_viewport_client_impl.h | |
parent | 9ad009acc0ad30112b4e3c18a8ad66c518ee6b6b (diff) | |
download | chromium_src-10c6f09565830cbee5b1405d9b2c2689fb6d1c6c.zip chromium_src-10c6f09565830cbee5b1405d9b2c2689fb6d1c6c.tar.gz chromium_src-10c6f09565830cbee5b1405d9b2c2689fb6d1c6c.tar.bz2 |
[Mojo] Draw GL from within sample_app
This CL replaces hello_world_service with native_viewport in mojo_shell and
sample_app. After this CL, we're able to draw GL from within sample_app.
However, we're still using a bit of a hack to transfer the GL interface to the
sample_app.
R=aa@chromium.org
BUG=none
Review URL: https://codereview.chromium.org/92643002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237659 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo/examples/sample_app/native_viewport_client_impl.h')
-rw-r--r-- | mojo/examples/sample_app/native_viewport_client_impl.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/mojo/examples/sample_app/native_viewport_client_impl.h b/mojo/examples/sample_app/native_viewport_client_impl.h new file mode 100644 index 0000000..da5b0a1 --- /dev/null +++ b/mojo/examples/sample_app/native_viewport_client_impl.h @@ -0,0 +1,33 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef MOJO_EXAMPLES_SAMPLE_APP_NATIVE_VIEWPORT_CLIENT_IMPL_H_ +#define MOJO_EXAMPLES_SAMPLE_APP_NATIVE_VIEWPORT_CLIENT_IMPL_H_ + +#include "mojo/public/bindings/lib/remote_ptr.h" +#include "mojom/native_viewport.h" + +namespace mojo { +namespace examples { + +class NativeViewportClientImpl : public NativeViewportClientStub { + public: + explicit NativeViewportClientImpl(ScopedMessagePipeHandle pipe); + virtual ~NativeViewportClientImpl(); + + virtual void DidOpen() MOJO_OVERRIDE; + virtual void DidCreateGLContext(uint64_t gl) MOJO_OVERRIDE; + + NativeViewport* service() { + return service_.get(); + } + + private: + RemotePtr<NativeViewport> service_; +}; + +} // examples +} // mojo + +#endif // MOJO_EXAMPLES_SAMPLE_APP_NATIVE_VIEWPORT_CLIENT_IMPL_H_ |