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

Side by Side Diff: ui/events/ozone/evdev/input_injector_evdev.cc

Issue 761843003: ozone: dri: Rename DriCursor::location() to GetLocation() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test Created 6 years 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/events/event.h" 5 #include "ui/events/event.h"
6 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h" 6 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h"
7 #include "ui/events/ozone/evdev/event_modifiers_evdev.h" 7 #include "ui/events/ozone/evdev/event_modifiers_evdev.h"
8 #include "ui/events/ozone/evdev/input_injector_evdev.h" 8 #include "ui/events/ozone/evdev/input_injector_evdev.h"
9 #include "ui/events/ozone/evdev/keyboard_evdev.h" 9 #include "ui/events/ozone/evdev/keyboard_evdev.h"
10 10
(...skipping 30 matching lines...) Expand all
41 default: 41 default:
42 LOG(WARNING) << "Invalid flag: " << button << " for the button parameter"; 42 LOG(WARNING) << "Invalid flag: " << button << " for the button parameter";
43 return; 43 return;
44 } 44 }
45 45
46 modifiers_->UpdateModifier(changed_button, down); 46 modifiers_->UpdateModifier(changed_button, down);
47 int changed_button_flag = 47 int changed_button_flag =
48 EventModifiersEvdev::GetEventFlagFromModifier(changed_button); 48 EventModifiersEvdev::GetEventFlagFromModifier(changed_button);
49 callback_.Run(make_scoped_ptr(new MouseEvent( 49 callback_.Run(make_scoped_ptr(new MouseEvent(
50 (down) ? ET_MOUSE_PRESSED : ET_MOUSE_RELEASED, 50 (down) ? ET_MOUSE_PRESSED : ET_MOUSE_RELEASED,
51 cursor_->location(), 51 cursor_->GetLocation(),
52 cursor_->location(), 52 cursor_->GetLocation(),
53 modifiers_->GetModifierFlags() | changed_button_flag, 53 modifiers_->GetModifierFlags() | changed_button_flag,
54 changed_button_flag))); 54 changed_button_flag)));
55 } 55 }
56 56
57 void InputInjectorEvdev::InjectMouseWheel(int delta_x, int delta_y) { 57 void InputInjectorEvdev::InjectMouseWheel(int delta_x, int delta_y) {
58 callback_.Run(make_scoped_ptr(new MouseWheelEvent( 58 callback_.Run(make_scoped_ptr(new MouseWheelEvent(
59 gfx::Vector2d(delta_x, delta_y), 59 gfx::Vector2d(delta_x, delta_y),
60 cursor_->location(), 60 cursor_->GetLocation(),
61 cursor_->location(), 61 cursor_->GetLocation(),
62 modifiers_->GetModifierFlags(), 62 modifiers_->GetModifierFlags(),
63 0 /* changed_button_flags */))); 63 0 /* changed_button_flags */)));
64 } 64 }
65 65
66 void InputInjectorEvdev::MoveCursorTo(const gfx::PointF& location) { 66 void InputInjectorEvdev::MoveCursorTo(const gfx::PointF& location) {
67 if (cursor_) { 67 if (cursor_) {
68 cursor_->MoveCursorTo(location); 68 cursor_->MoveCursorTo(location);
69 callback_.Run(make_scoped_ptr(new MouseEvent( 69 callback_.Run(make_scoped_ptr(new MouseEvent(
70 ET_MOUSE_MOVED, 70 ET_MOUSE_MOVED,
71 cursor_->location(), 71 cursor_->GetLocation(),
72 cursor_->location(), 72 cursor_->GetLocation(),
73 modifiers_->GetModifierFlags(), 73 modifiers_->GetModifierFlags(),
74 0 /* changed_button_flags */))); 74 0 /* changed_button_flags */)));
75 } 75 }
76 } 76 }
77 77
78 void InputInjectorEvdev::InjectKeyPress(DomCode physical_key, bool down) { 78 void InputInjectorEvdev::InjectKeyPress(DomCode physical_key, bool down) {
79 NOTIMPLEMENTED(); 79 NOTIMPLEMENTED();
80 } 80 }
81 81
82 } // namespace ui 82 } // namespace ui
83 83
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/event_factory_evdev.cc ('k') | ui/events/ozone/evdev/input_injector_evdev_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698