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_H_ |
| 6 #define MOJO_SERVICES_NATIVE_VIEWPORT_NATIVE_VIEWPORT_H_ |
| 7 |
| 8 #include "base/memory/scoped_ptr.h" |
| 9 |
| 10 namespace gfx { |
| 11 class Size; |
| 12 } |
| 13 |
| 14 namespace ui { |
| 15 class Event; |
| 16 } |
| 17 |
| 18 namespace mojo { |
| 19 namespace services { |
| 20 |
| 21 class NativeViewportDelegate { |
| 22 public: |
| 23 virtual ~NativeViewportDelegate() {} |
| 24 |
| 25 virtual bool OnEvent(ui::Event* event) = 0; |
| 26 |
| 27 virtual void OnResized(const gfx::Size& size) = 0; |
| 28 |
| 29 virtual void OnDestroyed() = 0; |
| 30 }; |
| 31 |
| 32 // Encapsulation of platform-specific Viewport. |
| 33 class NativeViewport { |
| 34 public: |
| 35 virtual ~NativeViewport() {} |
| 36 |
| 37 virtual void Close() = 0; |
| 38 |
| 39 static scoped_ptr<NativeViewport> Create(NativeViewportDelegate* delegate); |
| 40 }; |
| 41 |
| 42 } // namespace services |
| 43 } // namespace mojo |
| 44 |
| 45 #endif // MOJO_SERVICES_NATIVE_VIEWPORT_NATIVE_VIEWPORT_H_ |
OLD | NEW |