Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Unified Diff: services/native_viewport/ozone/app_delegate_ozone.cc

Issue 1309273005: native_viewport support for ozone (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: services/native_viewport/ozone/app_delegate_ozone.cc
diff --git a/services/native_viewport/ozone/app_delegate_ozone.cc b/services/native_viewport/ozone/app_delegate_ozone.cc
new file mode 100644
index 0000000000000000000000000000000000000000..2750fc896e1269d53cfb7464d698e3cd2496490b
--- /dev/null
+++ b/services/native_viewport/ozone/app_delegate_ozone.cc
@@ -0,0 +1,40 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "services/native_viewport/ozone/app_delegate_ozone.h"
+#include "ui/ozone/public/ipc_init_helper_mojo.h"
+#include "ui/ozone/public/ozone_platform.h"
+
+namespace native_viewport {
+
+void NativeViewportOzoneAppDelegate::Initialize(
+ mojo::ApplicationImpl* application) {
+ NativeViewportAppDelegate::Initialize(application);
+
+ ui::OzonePlatform::InitializeForUI();
+
+ auto ipc_init_helper = static_cast<ui::IpcInitHelperMojo*>(
+ ui::OzonePlatform::GetInstance()->GetIpcInitHelperOzone());
+
+ ipc_init_helper->HostInitialize(application);
+ ipc_init_helper->GpuInitialize(application);
+
+ display_manager_.reset(new DisplayManager());
+}
+
+bool NativeViewportOzoneAppDelegate::ConfigureIncomingConnection(
+ ApplicationConnection* connection) {
+ if (!NativeViewportAppDelegate::ConfigureIncomingConnection(connection))
+ return false;
+
+ auto ipc_init_helper = static_cast<ui::IpcInitHelperMojo*>(
+ ui::OzonePlatform::GetInstance()->GetIpcInitHelperOzone());
+
+ ipc_init_helper->HostConfigureIncomingConnection(connection);
+ ipc_init_helper->GpuConfigureIncomingConnection(connection);
+
+ return true;
+}
+
+} // namespace native_viewport
« no previous file with comments | « services/native_viewport/ozone/app_delegate_ozone.h ('k') | services/native_viewport/ozone/display_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698