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_SERVICES_NATIVE_VIEWPORT_NATIVE_VIEWPORT_CONTROLLER_H_ | 5 #ifndef MOJO_SERVICES_NATIVE_VIEWPORT_NATIVE_VIEWPORT_CONTROLLER_H_ |
6 #define MOJO_SERVICES_NATIVE_VIEWPORT_NATIVE_VIEWPORT_CONTROLLER_H_ | 6 #define MOJO_SERVICES_NATIVE_VIEWPORT_NATIVE_VIEWPORT_CONTROLLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "mojo/public/system/core.h" | 10 #include "mojo/public/system/core.h" |
11 #include "mojo/services/native_viewport/native_viewport.h" | 11 #include "mojo/services/native_viewport/native_viewport.h" |
12 | 12 |
| 13 namespace gpu { |
| 14 class GLInProcessContext; |
| 15 } |
| 16 |
13 namespace mojo { | 17 namespace mojo { |
14 namespace services { | 18 namespace services { |
15 | 19 |
16 class NativeViewportController : public services::NativeViewportDelegate { | 20 class NativeViewportController : public services::NativeViewportDelegate { |
17 public: | 21 public: |
18 // TODO(beng): Currently, pipe is just the single pipe that exists between | 22 // TODO(beng): Currently, pipe is just the single pipe that exists between |
19 // mojo_shell and the loaded app. This should really be hidden | 23 // mojo_shell and the loaded app. This should really be hidden |
20 // behind the bindings layer, when that comes up. | 24 // behind the bindings layer, when that comes up. |
21 NativeViewportController(shell::Context* context, | 25 NativeViewportController(shell::Context* context, |
22 Handle pipe); | 26 Handle pipe); |
23 virtual ~NativeViewportController(); | 27 virtual ~NativeViewportController(); |
24 | 28 |
25 void Close(); | 29 void Close(); |
26 | 30 |
27 private: | 31 private: |
28 // Overridden from services::NativeViewportDelegate: | 32 // Overridden from services::NativeViewportDelegate: |
| 33 virtual void OnResized(const gfx::Size& size) OVERRIDE; |
| 34 virtual void OnAcceleratedWidgetAvailable( |
| 35 gfx::AcceleratedWidget widget) OVERRIDE; |
29 virtual bool OnEvent(ui::Event* event) OVERRIDE; | 36 virtual bool OnEvent(ui::Event* event) OVERRIDE; |
30 virtual void OnDestroyed() OVERRIDE; | 37 virtual void OnDestroyed() OVERRIDE; |
31 virtual void OnGLContextAvailable(gpu::gles2::GLES2Interface*) OVERRIDE; | 38 |
32 virtual void OnGLContextLost() OVERRIDE; | 39 void OnGLContextLost(); |
33 virtual void OnResized(const gfx::Size& size) OVERRIDE; | |
34 | 40 |
35 void SendString(const std::string& string); | 41 void SendString(const std::string& string); |
36 | 42 |
37 Handle pipe_; | 43 Handle pipe_; |
38 scoped_ptr<NativeViewport> native_viewport_; | 44 scoped_ptr<NativeViewport> native_viewport_; |
| 45 scoped_ptr<gpu::GLInProcessContext> gl_context_; |
39 | 46 |
40 DISALLOW_COPY_AND_ASSIGN(NativeViewportController); | 47 DISALLOW_COPY_AND_ASSIGN(NativeViewportController); |
41 }; | 48 }; |
42 | 49 |
43 } // namespace services | 50 } // namespace services |
44 } // namespace mojo | 51 } // namespace mojo |
45 | 52 |
46 #endif // MOJO_SERVICES_NATIVE_VIEWPORT_NATIVE_VIEWPORT_CONTROLLER_H_ | 53 #endif // MOJO_SERVICES_NATIVE_VIEWPORT_NATIVE_VIEWPORT_CONTROLLER_H_ |
OLD | NEW |