| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ozone/platform/dri/dri_window.h" | 5 #include "ui/ozone/platform/dri/dri_window.h" |
| 6 | 6 |
| 7 #include "ui/events/event.h" | 7 #include "ui/events/event.h" |
| 8 #include "ui/events/platform/platform_event_source.h" | 8 #include "ui/events/platform/platform_event_source.h" |
| 9 #include "ui/ozone/platform/dri/dri_surface_factory.h" | 9 #include "ui/ozone/platform/dri/dri_surface_factory.h" |
| 10 #include "ui/ozone/public/cursor_factory_ozone.h" | 10 #include "ui/ozone/public/cursor_factory_ozone.h" |
| 11 #include "ui/ozone/public/surface_factory_ozone.h" | 11 #include "ui/ozone/public/surface_factory_ozone.h" |
| 12 #include "ui/platform_window/platform_window_delegate.h" | 12 #include "ui/platform_window/types/platform_window_delegate.h" |
| 13 | 13 |
| 14 namespace ui { | 14 namespace ui { |
| 15 | 15 |
| 16 DriWindow::DriWindow(PlatformWindowDelegate* delegate, | 16 DriWindow::DriWindow(PlatformWindowDelegate* delegate, |
| 17 const gfx::Rect& bounds, | 17 const gfx::Rect& bounds, |
| 18 DriSurfaceFactory* surface_factory) | 18 DriSurfaceFactory* surface_factory) |
| 19 : delegate_(delegate), bounds_(bounds) { | 19 : delegate_(delegate), bounds_(bounds) { |
| 20 widget_ = surface_factory->GetAcceleratedWidget(); | 20 widget_ = surface_factory->GetAcceleratedWidget(); |
| 21 delegate_->OnAcceleratedWidgetAvailable(widget_); | 21 delegate_->OnAcceleratedWidgetAvailable(widget_); |
| 22 PlatformEventSource::GetInstance()->AddPlatformEventDispatcher(this); | 22 PlatformEventSource::GetInstance()->AddPlatformEventDispatcher(this); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 return true; | 62 return true; |
| 63 } | 63 } |
| 64 | 64 |
| 65 uint32_t DriWindow::DispatchEvent(const PlatformEvent& ne) { | 65 uint32_t DriWindow::DispatchEvent(const PlatformEvent& ne) { |
| 66 Event* event = static_cast<Event*>(ne); | 66 Event* event = static_cast<Event*>(ne); |
| 67 delegate_->DispatchEvent(event); | 67 delegate_->DispatchEvent(event); |
| 68 return POST_DISPATCH_STOP_PROPAGATION; | 68 return POST_DISPATCH_STOP_PROPAGATION; |
| 69 } | 69 } |
| 70 | 70 |
| 71 } // namespace ui | 71 } // namespace ui |
| OLD | NEW |