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

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

Issue 698293002: ozone: Add PRESUBMIT.py to check patch formatting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 uint32_t DriWindow::DispatchEvent(const PlatformEvent& native_event) {
107 DispatchEventFromNativeUiEvent( 107 DispatchEventFromNativeUiEvent(
108 native_event, 108 native_event, base::Bind(&PlatformWindowDelegate::DispatchEvent,
109 base::Bind(&PlatformWindowDelegate::DispatchEvent, 109 base::Unretained(delegate_)));
110 base::Unretained(delegate_)));
111 return POST_DISPATCH_STOP_PROPAGATION; 110 return POST_DISPATCH_STOP_PROPAGATION;
112 } 111 }
113 112
114 void DriWindow::OnChannelEstablished() { 113 void DriWindow::OnChannelEstablished() {
115 sender_->Send(new OzoneGpuMsg_CreateWindowDelegate(widget_)); 114 sender_->Send(new OzoneGpuMsg_CreateWindowDelegate(widget_));
116 sender_->Send(new OzoneGpuMsg_WindowBoundsChanged(widget_, bounds_)); 115 sender_->Send(new OzoneGpuMsg_WindowBoundsChanged(widget_, bounds_));
117 } 116 }
118 117
119 void DriWindow::OnChannelDestroyed() { 118 void DriWindow::OnChannelDestroyed() {
120 } 119 }
121 120
122 } // namespace ui 121 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/dri_surface_factory_unittest.cc ('k') | ui/ozone/platform/dri/dri_window_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698