OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CHROMECAST_OZONE_SURFACE_FACTORY_CAST_H_ | 5 #ifndef UI_OZONE_PLATFORM_CAST_SURFACE_FACTORY_CAST_H_ |
6 #define CHROMECAST_OZONE_SURFACE_FACTORY_CAST_H_ | 6 #define UI_OZONE_PLATFORM_CAST_SURFACE_FACTORY_CAST_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "ui/gfx/geometry/size.h" | 10 #include "ui/gfx/geometry/size.h" |
11 #include "ui/ozone/public/surface_factory_ozone.h" | 11 #include "ui/ozone/public/surface_factory_ozone.h" |
12 | 12 |
13 namespace chromecast { | 13 namespace chromecast { |
14 namespace ozone { | 14 class CastEglPlatform; |
| 15 } |
15 | 16 |
16 class CastEglPlatform; | 17 namespace ui { |
17 | 18 |
18 // SurfaceFactoryOzone implementation for OzonePlatformCast. | 19 // SurfaceFactoryOzone implementation for OzonePlatformCast. |
19 class SurfaceFactoryCast : public ui::SurfaceFactoryOzone { | 20 class SurfaceFactoryCast : public SurfaceFactoryOzone { |
20 public: | 21 public: |
21 explicit SurfaceFactoryCast(scoped_ptr<CastEglPlatform> egl_platform); | 22 explicit SurfaceFactoryCast( |
| 23 scoped_ptr<chromecast::CastEglPlatform> egl_platform); |
22 ~SurfaceFactoryCast() override; | 24 ~SurfaceFactoryCast() override; |
23 | 25 |
24 // ui::SurfaceFactoryOzone implementation: | 26 // SurfaceFactoryOzone implementation: |
25 intptr_t GetNativeDisplay() override; | 27 intptr_t GetNativeDisplay() override; |
26 scoped_ptr<ui::SurfaceOzoneEGL> CreateEGLSurfaceForWidget( | 28 scoped_ptr<SurfaceOzoneEGL> CreateEGLSurfaceForWidget( |
27 gfx::AcceleratedWidget widget) override; | 29 gfx::AcceleratedWidget widget) override; |
28 const int32* GetEGLSurfaceProperties(const int32* desired_list) override; | 30 const int32* GetEGLSurfaceProperties(const int32* desired_list) override; |
29 bool LoadEGLGLES2Bindings( | 31 bool LoadEGLGLES2Bindings( |
30 AddGLLibraryCallback add_gl_library, | 32 AddGLLibraryCallback add_gl_library, |
31 SetGLGetProcAddressProcCallback set_gl_get_proc_address) override; | 33 SetGLGetProcAddressProcCallback set_gl_get_proc_address) override; |
32 | 34 |
33 void SetToRelinquishDisplay(const base::Closure& callback); | 35 void SetToRelinquishDisplay(const base::Closure& callback); |
34 intptr_t GetNativeWindow(); | 36 intptr_t GetNativeWindow(); |
35 bool ResizeDisplay(gfx::Size viewport_size); | 37 bool ResizeDisplay(gfx::Size viewport_size); |
36 void ChildDestroyed(); | 38 void ChildDestroyed(); |
(...skipping 14 matching lines...) Expand all Loading... |
51 }; | 53 }; |
52 | 54 |
53 void CreateDisplayTypeAndWindowIfNeeded(); | 55 void CreateDisplayTypeAndWindowIfNeeded(); |
54 void DestroyDisplayTypeAndWindow(); | 56 void DestroyDisplayTypeAndWindow(); |
55 void InitializeHardware(); | 57 void InitializeHardware(); |
56 void ShutdownHardware(); | 58 void ShutdownHardware(); |
57 | 59 |
58 HardwareState state_; | 60 HardwareState state_; |
59 DestroyWindowPendingState destroy_window_pending_state_; | 61 DestroyWindowPendingState destroy_window_pending_state_; |
60 base::Closure relinquish_display_callback_; | 62 base::Closure relinquish_display_callback_; |
61 intptr_t display_type_; | 63 void* display_type_; |
62 intptr_t window_; | 64 void* window_; |
63 const gfx::Size default_display_size_; | 65 const gfx::Size default_display_size_; |
64 gfx::Size display_size_; | 66 gfx::Size display_size_; |
65 gfx::Size new_display_size_; | 67 gfx::Size new_display_size_; |
66 scoped_ptr<CastEglPlatform> egl_platform_; | 68 scoped_ptr<chromecast::CastEglPlatform> egl_platform_; |
67 | 69 |
68 DISALLOW_COPY_AND_ASSIGN(SurfaceFactoryCast); | 70 DISALLOW_COPY_AND_ASSIGN(SurfaceFactoryCast); |
69 }; | 71 }; |
70 | 72 |
71 } // namespace ozone | 73 } // namespace ui |
72 } // namespace chromecast | |
73 | 74 |
74 #endif // CHROMECAST_OZONE_SURFACE_FACTORY_CAST_H_ | 75 #endif // UI_OZONE_PLATFORM_CAST_SURFACE_FACTORY_CAST_H_ |
OLD | NEW |