Chromium Code Reviews| 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; |
| } |