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

Side by Side Diff: ui/ozone/platform/dri/dri_window.cc

Issue 403263002: platform-window: Add a PlatformWindowFactory for creating windows. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/ozone/platform/dri/dri_window.h ('k') | ui/ozone/platform/egltest/ozone_platform_egltest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/dri_window.h ('k') | ui/ozone/platform/egltest/ozone_platform_egltest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698