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

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

Issue 667823002: PlatformEventDispatcher::DispatchEvent() should return a PostDispatchAction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ui_enums
Patch Set: Fix platform_event_source_unittest.cc Created 6 years, 2 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
« 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "ui/events/event.h" 8 #include "ui/events/event.h"
9 #include "ui/events/ozone/evdev/event_factory_evdev.h" 9 #include "ui/events/ozone/evdev/event_factory_evdev.h"
10 #include "ui/events/ozone/events_ozone.h" 10 #include "ui/events/ozone/events_ozone.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 bool DriWindow::CanDispatchEvent(const PlatformEvent& ne) { 97 bool DriWindow::CanDispatchEvent(const PlatformEvent& ne) {
98 DCHECK(ne); 98 DCHECK(ne);
99 Event* event = static_cast<Event*>(ne); 99 Event* event = static_cast<Event*>(ne);
100 if (event->IsMouseEvent() || event->IsScrollEvent()) 100 if (event->IsMouseEvent() || event->IsScrollEvent())
101 return window_manager_->cursor()->GetCursorWindow() == widget_; 101 return window_manager_->cursor()->GetCursorWindow() == widget_;
102 102
103 return true; 103 return true;
104 } 104 }
105 105
106 uint32_t DriWindow::DispatchEvent(const PlatformEvent& native_event) { 106 ui::PostDispatchAction DriWindow::DispatchEvent(
107 const PlatformEvent& native_event) {
107 DispatchEventFromNativeUiEvent( 108 DispatchEventFromNativeUiEvent(
108 native_event, 109 native_event,
109 base::Bind(&PlatformWindowDelegate::DispatchEvent, 110 base::Bind(&PlatformWindowDelegate::DispatchEvent,
110 base::Unretained(delegate_))); 111 base::Unretained(delegate_)));
111 return POST_DISPATCH_STOP_PROPAGATION; 112 return POST_DISPATCH_STOP_PROPAGATION;
112 } 113 }
113 114
114 void DriWindow::OnChannelEstablished() { 115 void DriWindow::OnChannelEstablished() {
115 sender_->Send(new OzoneGpuMsg_CreateWindowDelegate(widget_)); 116 sender_->Send(new OzoneGpuMsg_CreateWindowDelegate(widget_));
116 sender_->Send(new OzoneGpuMsg_WindowBoundsChanged(widget_, bounds_)); 117 sender_->Send(new OzoneGpuMsg_WindowBoundsChanged(widget_, bounds_));
117 } 118 }
118 119
119 void DriWindow::OnChannelDestroyed() { 120 void DriWindow::OnChannelDestroyed() {
120 } 121 }
121 122
122 } // namespace ui 123 } // 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