| 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), widget_(0), bounds_(bounds) { |
| 14 widget_(0), | 15 ui::OzonePlatform::Initialize(); |
| 15 bounds_(bounds), | 16 factory_.reset(ui::EventFactoryOzone::GetInstance()); |
| 16 factory_(ui::EventFactoryOzone::GetInstance()) { | |
| 17 factory_->StartProcessingEvents(); | 17 factory_->StartProcessingEvents(); |
| 18 gfx::SurfaceFactoryOzone* surface_factory = | 18 gfx::SurfaceFactoryOzone* surface_factory = |
| 19 gfx::SurfaceFactoryOzone::GetInstance(); | 19 gfx::SurfaceFactoryOzone::GetInstance(); |
| 20 widget_ = surface_factory->GetAcceleratedWidget(); | 20 widget_ = surface_factory->GetAcceleratedWidget(); |
| 21 | 21 |
| 22 surface_factory->AttemptToResizeAcceleratedWidget(widget_, bounds_); | 22 surface_factory->AttemptToResizeAcceleratedWidget(widget_, bounds_); |
| 23 | 23 |
| 24 base::MessagePumpOzone::Current()->AddDispatcherForRootWindow(this); | 24 base::MessagePumpOzone::Current()->AddDispatcherForRootWindow(this); |
| 25 } | 25 } |
| 26 | 26 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 return new RootWindowHostOzone(bounds); | 126 return new RootWindowHostOzone(bounds); |
| 127 } | 127 } |
| 128 | 128 |
| 129 // static | 129 // static |
| 130 gfx::Size RootWindowHost::GetNativeScreenSize() { | 130 gfx::Size RootWindowHost::GetNativeScreenSize() { |
| 131 NOTIMPLEMENTED(); | 131 NOTIMPLEMENTED(); |
| 132 return gfx::Size(); | 132 return gfx::Size(); |
| 133 } | 133 } |
| 134 | 134 |
| 135 } // namespace aura | 135 } // namespace aura |
| OLD | NEW |