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