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 "services/native_viewport/ozone/app_delegate_ozone.h" | 5 #include "services/native_viewport/ozone/app_delegate_ozone.h" |
6 #include "ui/ozone/public/ipc_init_helper_mojo.h" | 6 #include "ui/ozone/public/ipc_init_helper_mojo.h" |
7 #include "ui/ozone/public/ozone_platform.h" | 7 #include "ui/ozone/public/ozone_platform.h" |
8 | 8 |
9 namespace native_viewport { | 9 namespace native_viewport { |
10 | 10 |
11 void NativeViewportOzoneAppDelegate::Initialize( | 11 void NativeViewportOzoneAppDelegate::Initialize( |
12 mojo::ApplicationImpl* application) { | 12 mojo::ApplicationImpl* application) { |
13 NativeViewportAppDelegate::Initialize(application); | 13 NativeViewportAppDelegate::Initialize(application); |
14 | 14 |
15 ui::OzonePlatform::InitializeForUI(); | 15 ui::OzonePlatform::InitializeForUI(); |
16 | 16 |
17 auto ipc_init_helper = static_cast<ui::IpcInitHelperMojo*>( | 17 auto ipc_init_helper = static_cast<ui::IpcInitHelperMojo*>( |
18 ui::OzonePlatform::GetInstance()->GetIpcInitHelperOzone()); | 18 ui::OzonePlatform::GetInstance()->GetIpcInitHelperOzone()); |
19 | 19 |
20 ipc_init_helper->HostInitialize(application); | 20 ipc_init_helper->HostInitialize(application); |
21 ipc_init_helper->GpuInitialize(application); | 21 ipc_init_helper->GpuInitialize(application); |
22 | 22 |
23 display_manager_.reset(new DisplayManager()); | 23 display_manager_.reset(new DisplayManager()); |
24 } | 24 } |
25 | 25 |
26 bool NativeViewportOzoneAppDelegate::ConfigureIncomingConnection( | 26 bool NativeViewportOzoneAppDelegate::ConfigureIncomingConnection( |
27 ApplicationConnection* connection) { | 27 ServiceProviderImpl* service_provider_impl) { |
28 if (!NativeViewportAppDelegate::ConfigureIncomingConnection(connection)) | 28 if (!NativeViewportAppDelegate::ConfigureIncomingConnection( |
| 29 service_provider_impl)) |
29 return false; | 30 return false; |
30 | 31 |
31 auto ipc_init_helper = static_cast<ui::IpcInitHelperMojo*>( | 32 auto ipc_init_helper = static_cast<ui::IpcInitHelperMojo*>( |
32 ui::OzonePlatform::GetInstance()->GetIpcInitHelperOzone()); | 33 ui::OzonePlatform::GetInstance()->GetIpcInitHelperOzone()); |
33 | 34 |
34 ipc_init_helper->HostConfigureIncomingConnection(connection); | 35 ipc_init_helper->HostConfigureIncomingConnection(connection); |
35 ipc_init_helper->GpuConfigureIncomingConnection(connection); | 36 ipc_init_helper->GpuConfigureIncomingConnection(connection); |
36 | 37 |
37 return true; | 38 return true; |
38 } | 39 } |
39 | 40 |
40 } // namespace native_viewport | 41 } // namespace native_viewport |
OLD | NEW |