| 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 16 matching lines...) Expand all Loading... |
| 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 gfx::Size GetSize() OVERRIDE; |
| 37 virtual void Open() OVERRIDE; |
| 37 virtual void Close() OVERRIDE; | 38 virtual void Close() OVERRIDE; |
| 38 | 39 |
| 39 void ReleaseWindow(); | 40 void ReleaseWindow(); |
| 40 | 41 |
| 41 NativeViewportDelegate* delegate_; | 42 NativeViewportDelegate* delegate_; |
| 42 ANativeWindow* window_; | 43 ANativeWindow* window_; |
| 43 gfx::Size size_; | 44 gfx::Size size_; |
| 44 | 45 |
| 45 base::WeakPtrFactory<NativeViewportAndroid> weak_factory_; | 46 base::WeakPtrFactory<NativeViewportAndroid> weak_factory_; |
| 46 | 47 |
| 47 DISALLOW_COPY_AND_ASSIGN(NativeViewportAndroid); | 48 DISALLOW_COPY_AND_ASSIGN(NativeViewportAndroid); |
| 48 }; | 49 }; |
| 49 | 50 |
| 50 | 51 |
| 51 } // namespace services | 52 } // namespace services |
| 52 } // namespace mojo | 53 } // namespace mojo |
| 53 | 54 |
| 54 #endif // MOJO_SERVICES_NATIVE_VIEWPORT_NATIVE_VIEWPORT_ANDROID_H_ | 55 #endif // MOJO_SERVICES_NATIVE_VIEWPORT_NATIVE_VIEWPORT_ANDROID_H_ |
| OLD | NEW |