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

Unified Diff: ui/aura/window_tree_host_platform.cc

Issue 1408373005: Add WindowTreeHostPlatform::GetHost for Android build (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
« no previous file with comments | « ui/aura/window_tree_host_platform.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window_tree_host_platform.cc
diff --git a/ui/aura/window_tree_host_platform.cc b/ui/aura/window_tree_host_platform.cc
index 0ec5a8639e7472141f255133beacbbf86d8803d1..6108a3231364b1e25afaa8b3615c089c37c358cc 100644
--- a/ui/aura/window_tree_host_platform.cc
+++ b/ui/aura/window_tree_host_platform.cc
@@ -25,10 +25,26 @@
#endif
namespace aura {
+#if defined(OS_ANDROID)
+namespace {
+ WindowTreeHostPlatform* instance = nullptr;
+}
+
+// static
+WindowTreeHostPlatform* WindowTreeHostPlatform::GetHost() {
+ return instance;
+}
+#endif
// static
WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds) {
+#if defined(OS_ANDROID)
+ DCHECK(!instance);
+ instance = new WindowTreeHostPlatform(bounds);
+ return instance;
+#else
return new WindowTreeHostPlatform(bounds);
+#endif
}
WindowTreeHostPlatform::WindowTreeHostPlatform(const gfx::Rect& bounds)
« no previous file with comments | « ui/aura/window_tree_host_platform.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698