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

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

Issue 1017473002: [Merge] Make mouse buttons 8 - 11 navigate forward and back in history (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2311
Patch Set: Created 5 years, 9 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
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/ozone/evdev/event_factory_evdev.h" 5 #include "ui/events/ozone/evdev/event_factory_evdev.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/task_runner.h" 8 #include "base/task_runner.h"
9 #include "base/thread_task_runner_handle.h" 9 #include "base/thread_task_runner_handle.h"
10 #include "base/threading/worker_pool.h" 10 #include "base/threading/worker_pool.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 switch (button) { 171 switch (button) {
172 case BTN_LEFT: 172 case BTN_LEFT:
173 modifier = EVDEV_MODIFIER_LEFT_MOUSE_BUTTON; 173 modifier = EVDEV_MODIFIER_LEFT_MOUSE_BUTTON;
174 break; 174 break;
175 case BTN_RIGHT: 175 case BTN_RIGHT:
176 modifier = EVDEV_MODIFIER_RIGHT_MOUSE_BUTTON; 176 modifier = EVDEV_MODIFIER_RIGHT_MOUSE_BUTTON;
177 break; 177 break;
178 case BTN_MIDDLE: 178 case BTN_MIDDLE:
179 modifier = EVDEV_MODIFIER_MIDDLE_MOUSE_BUTTON; 179 modifier = EVDEV_MODIFIER_MIDDLE_MOUSE_BUTTON;
180 break; 180 break;
181 case BTN_BACK:
182 modifier = EVDEV_MODIFIER_BACK_MOUSE_BUTTON;
183 break;
184 case BTN_FORWARD:
185 modifier = EVDEV_MODIFIER_FORWARD_MOUSE_BUTTON;
186 break;
181 default: 187 default:
182 return; 188 return;
183 } 189 }
184 190
185 int flag = modifiers_.GetEventFlagFromModifier(modifier); 191 int flag = modifiers_.GetEventFlagFromModifier(modifier);
186 modifiers_.UpdateModifier(modifier, params.down); 192 modifiers_.UpdateModifier(modifier, params.down);
187 193
188 MouseEvent event(params.down ? ui::ET_MOUSE_PRESSED : ui::ET_MOUSE_RELEASED, 194 MouseEvent event(params.down ? ui::ET_MOUSE_PRESSED : ui::ET_MOUSE_RELEASED,
189 params.location, params.location, params.timestamp, 195 params.location, params.location, params.timestamp,
190 modifiers_.GetModifierFlags() | flag, 196 modifiers_.GetModifierFlags() | flag,
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 333
328 // Hook up device configuration. 334 // Hook up device configuration.
329 input_controller_.SetInputDeviceFactory(input_device_factory_proxy_.get()); 335 input_controller_.SetInputDeviceFactory(input_device_factory_proxy_.get());
330 336
331 // Scan & monitor devices. 337 // Scan & monitor devices.
332 device_manager_->AddObserver(this); 338 device_manager_->AddObserver(this);
333 device_manager_->ScanDevices(this); 339 device_manager_->ScanDevices(this);
334 } 340 }
335 341
336 } // namespace ui 342 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/event_converter_evdev_impl_unittest.cc ('k') | ui/events/ozone/evdev/event_modifiers_evdev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698