| 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_ANDROID_H_ | 5 #ifndef MOJO_SERVICES_NATIVE_VIEWPORT_NATIVE_VIEWPORT_ANDROID_H_ |
| 6 #define MOJO_SERVICES_NATIVE_VIEWPORT_NATIVE_VIEWPORT_ANDROID_H_ | 6 #define MOJO_SERVICES_NATIVE_VIEWPORT_NATIVE_VIEWPORT_ANDROID_H_ |
| 7 | 7 |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "mojo/services/native_viewport/native_viewport.h" | 9 #include "mojo/services/native_viewport/native_viewport.h" |
| 10 #include "ui/gfx/size.h" | 10 #include "ui/gfx/size.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 base::WeakPtr<NativeViewportAndroid> GetWeakPtr() { | 26 base::WeakPtr<NativeViewportAndroid> GetWeakPtr() { |
| 27 return weak_factory_.GetWeakPtr(); | 27 return weak_factory_.GetWeakPtr(); |
| 28 } | 28 } |
| 29 | 29 |
| 30 void OnNativeWindowCreated(ANativeWindow* window); | 30 void OnNativeWindowCreated(ANativeWindow* window); |
| 31 void OnNativeWindowDestroyed(); | 31 void OnNativeWindowDestroyed(); |
| 32 void OnResized(const gfx::Size& size); | 32 void OnResized(const gfx::Size& size); |
| 33 | 33 |
| 34 private: | 34 private: |
| 35 // Overridden from NativeViewport: | 35 // Overridden from NativeViewport: |
| 36 virtual gfx::Size GetSize() OVERRIDE; |
| 36 virtual void Close() OVERRIDE; | 37 virtual void Close() OVERRIDE; |
| 37 | 38 |
| 38 void OnGLContextLost(); | |
| 39 void ReleaseWindow(); | 39 void ReleaseWindow(); |
| 40 | 40 |
| 41 NativeViewportDelegate* delegate_; | 41 NativeViewportDelegate* delegate_; |
| 42 ANativeWindow* window_; | 42 ANativeWindow* window_; |
| 43 gfx::Size size_; | 43 gfx::Size size_; |
| 44 scoped_ptr<gpu::GLInProcessContext> gl_context_; | |
| 45 | 44 |
| 46 base::WeakPtrFactory<NativeViewportAndroid> weak_factory_; | 45 base::WeakPtrFactory<NativeViewportAndroid> weak_factory_; |
| 47 | 46 |
| 48 DISALLOW_COPY_AND_ASSIGN(NativeViewportAndroid); | 47 DISALLOW_COPY_AND_ASSIGN(NativeViewportAndroid); |
| 49 }; | 48 }; |
| 50 | 49 |
| 51 | 50 |
| 52 } // namespace services | 51 } // namespace services |
| 53 } // namespace mojo | 52 } // namespace mojo |
| 54 | 53 |
| 55 #endif // MOJO_SERVICES_NATIVE_VIEWPORT_NATIVE_VIEWPORT_ANDROID_H_ | 54 #endif // MOJO_SERVICES_NATIVE_VIEWPORT_NATIVE_VIEWPORT_ANDROID_H_ |
| OLD | NEW |