Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/aura/root_window_host_ozone.h" | 5 #include "ui/aura/root_window_host_ozone.h" |
| 6 | 6 |
| 7 #include "ui/aura/root_window.h" | 7 #include "ui/aura/root_window.h" |
| 8 #include "ui/gfx/ozone/surface_factory_ozone.h" | 8 #include "ui/gfx/ozone/surface_factory_ozone.h" |
| 9 #include "ui/ozone/ozone_platform.h" | |
| 9 | 10 |
| 10 namespace aura { | 11 namespace aura { |
| 11 | 12 |
| 12 RootWindowHostOzone::RootWindowHostOzone(const gfx::Rect& bounds) | 13 RootWindowHostOzone::RootWindowHostOzone(const gfx::Rect& bounds) |
| 13 : delegate_(NULL), | 14 : delegate_(NULL), |
| 14 widget_(0), | 15 widget_(0), |
| 15 bounds_(bounds), | 16 bounds_(bounds), |
| 16 factory_(ui::EventFactoryOzone::GetInstance()) { | 17 factory_(ui::EventFactoryOzone::GetInstance()) { |
|
kalyank
2013/10/30 23:21:15
We try to retrieve eventfactory instance before oz
spang
2013/10/31 00:38:24
Fixed. Was hitting a fallback that we should remov
| |
| 18 ui::OzonePlatform::Initialize(); | |
| 17 factory_->CreateStartupEventConverters(); | 19 factory_->CreateStartupEventConverters(); |
| 18 gfx::SurfaceFactoryOzone* surface_factory = | 20 gfx::SurfaceFactoryOzone* surface_factory = |
| 19 gfx::SurfaceFactoryOzone::GetInstance(); | 21 gfx::SurfaceFactoryOzone::GetInstance(); |
| 20 widget_ = surface_factory->GetAcceleratedWidget(); | 22 widget_ = surface_factory->GetAcceleratedWidget(); |
| 21 | 23 |
| 22 surface_factory->AttemptToResizeAcceleratedWidget(widget_, bounds_); | 24 surface_factory->AttemptToResizeAcceleratedWidget(widget_, bounds_); |
| 23 | 25 |
| 24 base::MessagePumpOzone::Current()->AddDispatcherForRootWindow(this); | 26 base::MessagePumpOzone::Current()->AddDispatcherForRootWindow(this); |
| 25 } | 27 } |
| 26 | 28 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 126 return new RootWindowHostOzone(bounds); | 128 return new RootWindowHostOzone(bounds); |
| 127 } | 129 } |
| 128 | 130 |
| 129 // static | 131 // static |
| 130 gfx::Size RootWindowHost::GetNativeScreenSize() { | 132 gfx::Size RootWindowHost::GetNativeScreenSize() { |
| 131 NOTIMPLEMENTED(); | 133 NOTIMPLEMENTED(); |
| 132 return gfx::Size(); | 134 return gfx::Size(); |
| 133 } | 135 } |
| 134 | 136 |
| 135 } // namespace aura | 137 } // namespace aura |
| OLD | NEW |