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_H_ | 5 #ifndef MOJO_SERVICES_NATIVE_VIEWPORT_NATIVE_VIEWPORT_H_ |
6 #define MOJO_SERVICES_NATIVE_VIEWPORT_NATIVE_VIEWPORT_H_ | 6 #define MOJO_SERVICES_NATIVE_VIEWPORT_NATIVE_VIEWPORT_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "ui/gfx/native_widget_types.h" | 9 #include "ui/gfx/native_widget_types.h" |
10 #include "ui/gfx/size.h" | 10 #include "ui/gfx/size.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 virtual bool OnEvent(ui::Event* event) = 0; | 29 virtual bool OnEvent(ui::Event* event) = 0; |
30 virtual void OnDestroyed() = 0; | 30 virtual void OnDestroyed() = 0; |
31 }; | 31 }; |
32 | 32 |
33 // Encapsulation of platform-specific Viewport. | 33 // Encapsulation of platform-specific Viewport. |
34 class NativeViewport { | 34 class NativeViewport { |
35 public: | 35 public: |
36 virtual ~NativeViewport() {} | 36 virtual ~NativeViewport() {} |
37 | 37 |
38 virtual gfx::Size GetSize() = 0; | 38 virtual gfx::Size GetSize() = 0; |
| 39 virtual void Init() = 0; |
39 virtual void Close() = 0; | 40 virtual void Close() = 0; |
40 | 41 |
41 static scoped_ptr<NativeViewport> Create(shell::Context* context, | 42 static scoped_ptr<NativeViewport> Create(shell::Context* context, |
42 NativeViewportDelegate* delegate); | 43 NativeViewportDelegate* delegate); |
43 }; | 44 }; |
44 | 45 |
45 } // namespace services | 46 } // namespace services |
46 } // namespace mojo | 47 } // namespace mojo |
47 | 48 |
48 #endif // MOJO_SERVICES_NATIVE_VIEWPORT_NATIVE_VIEWPORT_H_ | 49 #endif // MOJO_SERVICES_NATIVE_VIEWPORT_NATIVE_VIEWPORT_H_ |
OLD | NEW |