| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MOJO_EXAMPLES_SAMPLE_APP_NATIVE_VIEWPORT_CLIENT_IMPL_H_ | 5 #ifndef MOJO_EXAMPLES_SAMPLE_APP_NATIVE_VIEWPORT_CLIENT_IMPL_H_ |
| 6 #define MOJO_EXAMPLES_SAMPLE_APP_NATIVE_VIEWPORT_CLIENT_IMPL_H_ | 6 #define MOJO_EXAMPLES_SAMPLE_APP_NATIVE_VIEWPORT_CLIENT_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "mojo/examples/sample_app/gles2_client_impl.h" | 9 #include "mojo/examples/sample_app/gles2_client_impl.h" |
| 10 #include "mojo/public/bindings/lib/remote_ptr.h" | 10 #include "mojo/public/bindings/lib/remote_ptr.h" |
| 11 #include "mojom/native_viewport.h" | 11 #include "mojom/native_viewport.h" |
| 12 | 12 |
| 13 namespace mojo { | 13 namespace mojo { |
| 14 namespace examples { | 14 namespace examples { |
| 15 | 15 |
| 16 class NativeViewportClientImpl : public NativeViewportClientStub { | 16 class NativeViewportClientImpl : public NativeViewportClientStub { |
| 17 public: | 17 public: |
| 18 explicit NativeViewportClientImpl(ScopedMessagePipeHandle pipe); | 18 explicit NativeViewportClientImpl(ScopedMessagePipeHandle pipe); |
| 19 virtual ~NativeViewportClientImpl(); | 19 virtual ~NativeViewportClientImpl(); |
| 20 | 20 |
| 21 void Open(); | 21 void Open(); |
| 22 | 22 |
| 23 private: | 23 private: |
| 24 virtual void DidOpen() MOJO_OVERRIDE; | 24 virtual void DidOpen() MOJO_OVERRIDE; |
| 25 virtual void HandleEvent(const Event& event) MOJO_OVERRIDE; |
| 25 | 26 |
| 26 scoped_ptr<GLES2ClientImpl> gles2_client_; | 27 scoped_ptr<GLES2ClientImpl> gles2_client_; |
| 27 | 28 |
| 28 RemotePtr<NativeViewport> service_; | 29 RemotePtr<NativeViewport> service_; |
| 29 | 30 |
| 30 MOJO_DISALLOW_COPY_AND_ASSIGN(NativeViewportClientImpl); | 31 MOJO_DISALLOW_COPY_AND_ASSIGN(NativeViewportClientImpl); |
| 31 }; | 32 }; |
| 32 | 33 |
| 33 } // namespace examples | 34 } // namespace examples |
| 34 } // namespace mojo | 35 } // namespace mojo |
| 35 | 36 |
| 36 #endif // MOJO_EXAMPLES_SAMPLE_APP_NATIVE_VIEWPORT_CLIENT_IMPL_H_ | 37 #endif // MOJO_EXAMPLES_SAMPLE_APP_NATIVE_VIEWPORT_CLIENT_IMPL_H_ |
| OLD | NEW |