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

Unified Diff: ui/aura/window_tree_host_platform.cc

Issue 1410153003: Browser frame for Aura Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed unrelated changes + formatting. 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
« ui/aura/window_tree_host_platform.h ('K') | « 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..3b2dd875192a34fa690831e68be0d2ceff71d3d1 100644
--- a/ui/aura/window_tree_host_platform.cc
+++ b/ui/aura/window_tree_host_platform.cc
@@ -25,6 +25,9 @@
#endif
namespace aura {
+namespace {
+static WindowTreeHostAndroid* instance = nullptr;
no sievers 2015/10/28 20:04:51 this class is not a singleton, there will be multi
Hadi 2015/10/29 15:27:02 Going to look into this.
mfomitchev 2015/10/29 15:53:44 @sievers: added you to https://codereview.chromium
+}
// static
WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds) {
@@ -35,6 +38,8 @@ WindowTreeHostPlatform::WindowTreeHostPlatform(const gfx::Rect& bounds)
: widget_(gfx::kNullAcceleratedWidget),
current_cursor_(ui::kCursorNull),
has_capture_(false) {
+ DCHECK(!instance);
+ instance = this;
#if defined(USE_OZONE)
window_ =
ui::OzonePlatform::GetInstance()->CreatePlatformWindow(this, bounds);
@@ -52,6 +57,10 @@ WindowTreeHostPlatform::~WindowTreeHostPlatform() {
DestroyDispatcher();
}
+WindowTreeHostPlatform* WindowTreeHostPlatform::GetHost() {
+ return host;
+}
+
ui::EventSource* WindowTreeHostPlatform::GetEventSource() {
return this;
}
« ui/aura/window_tree_host_platform.h ('K') | « 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