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 #include "ui/ozone/platform/cast/ozone_platform_cast.h" | 5 #include "ui/ozone/platform/cast/ozone_platform_cast.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chromecast/public/cast_egl_platform.h" | 8 #include "chromecast/public/cast_egl_platform.h" |
9 #include "chromecast/public/cast_egl_platform_shlib.h" | 9 #include "chromecast/public/cast_egl_platform_shlib.h" |
10 #include "ui/ozone/common/native_display_delegate_ozone.h" | 10 #include "ui/ozone/common/native_display_delegate_ozone.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 cursor_factory_.reset(new CursorFactoryOzone()); | 73 cursor_factory_.reset(new CursorFactoryOzone()); |
74 input_controller_ = CreateStubInputController(); | 74 input_controller_ = CreateStubInputController(); |
75 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost()); | 75 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost()); |
76 } | 76 } |
77 void InitializeGPU() override { | 77 void InitializeGPU() override { |
78 surface_factory_.reset(new SurfaceFactoryCast(egl_platform_.Pass())); | 78 surface_factory_.reset(new SurfaceFactoryCast(egl_platform_.Pass())); |
79 gpu_platform_support_.reset( | 79 gpu_platform_support_.reset( |
80 new GpuPlatformSupportCast(surface_factory_.get())); | 80 new GpuPlatformSupportCast(surface_factory_.get())); |
81 } | 81 } |
82 | 82 |
| 83 void InitializeTest() override { |
| 84 InitializeUI(); |
| 85 InitializeGPU(); |
| 86 } |
| 87 |
83 private: | 88 private: |
84 scoped_ptr<CastEglPlatform> egl_platform_; | 89 scoped_ptr<CastEglPlatform> egl_platform_; |
85 scoped_ptr<SurfaceFactoryCast> surface_factory_; | 90 scoped_ptr<SurfaceFactoryCast> surface_factory_; |
86 scoped_ptr<CursorFactoryOzone> cursor_factory_; | 91 scoped_ptr<CursorFactoryOzone> cursor_factory_; |
87 scoped_ptr<InputController> input_controller_; | 92 scoped_ptr<InputController> input_controller_; |
88 scoped_ptr<GpuPlatformSupportCast> gpu_platform_support_; | 93 scoped_ptr<GpuPlatformSupportCast> gpu_platform_support_; |
89 scoped_ptr<GpuPlatformSupportHost> gpu_platform_support_host_; | 94 scoped_ptr<GpuPlatformSupportHost> gpu_platform_support_host_; |
90 scoped_ptr<OverlayManagerOzone> overlay_manager_; | 95 scoped_ptr<OverlayManagerOzone> overlay_manager_; |
91 | 96 |
92 DISALLOW_COPY_AND_ASSIGN(OzonePlatformCast); | 97 DISALLOW_COPY_AND_ASSIGN(OzonePlatformCast); |
93 }; | 98 }; |
94 | 99 |
95 } // namespace | 100 } // namespace |
96 | 101 |
97 OzonePlatform* CreateOzonePlatformCast() { | 102 OzonePlatform* CreateOzonePlatformCast() { |
98 const std::vector<std::string>& argv = | 103 const std::vector<std::string>& argv = |
99 base::CommandLine::ForCurrentProcess()->argv(); | 104 base::CommandLine::ForCurrentProcess()->argv(); |
100 scoped_ptr<chromecast::CastEglPlatform> platform( | 105 scoped_ptr<chromecast::CastEglPlatform> platform( |
101 chromecast::CastEglPlatformShlib::Create(argv)); | 106 chromecast::CastEglPlatformShlib::Create(argv)); |
102 return new OzonePlatformCast(platform.Pass()); | 107 return new OzonePlatformCast(platform.Pass()); |
103 } | 108 } |
104 | 109 |
105 } // namespace ui | 110 } // namespace ui |
OLD | NEW |