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

Unified Diff: ui/platform_window/platform_window.cc

Issue 1390883003: aura: Unify WindowTreeHost for some platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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: ui/platform_window/platform_window.cc
diff --git a/ui/platform_window/platform_window.cc b/ui/platform_window/platform_window.cc
new file mode 100644
index 0000000000000000000000000000000000000000..cfedc4eae884b6580bfa6edac9e6345c3a115daf
--- /dev/null
+++ b/ui/platform_window/platform_window.cc
@@ -0,0 +1,32 @@
+// 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 "ui/platform_window/platform_window.h"
+
+#if defined(OS_WIN)
+#include "ui/platform_window/win/win_window.h"
+#elif defined(USE_OZONE)
+#include "ui/ozone/public/ozone_platform.h"
sadrul 2015/10/08 15:18:10 We can't depend on ozone from here, since ozone al
no sievers 2015/10/09 00:34:18 Done.
+#endif
+
+namespace ui {
+
+#if defined(OS_WIN)
+// static
+scoped_ptr<PlatformWindow> PlatformWindow::Create(
+ PlatformWindowDelegate* delegate,
+ const gfx::Rect& bounds) {
+ return new WinWindow(delegate, bounds);
+}
+#elif defined(USE_OZONE)
+// static
+scoped_ptr<PlatformWindow> PlatformWindow::Create(
+ PlatformWindowDelegate* delegate,
+ const gfx::Rect& bounds) {
+ return ui::OzonePlatform::GetInstance()->CreatePlatformWindow(delegate,
+ bounds);
+}
+#endif
+
+} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698