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

Side by Side Diff: ui/events/devices/x11/device_data_manager_x11.cc

Issue 1539583003: Convert Pass()→std::move() in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « ui/compositor/test/in_process_context_factory.cc ('k') | ui/events/event.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/events/devices/x11/device_data_manager_x11.h" 5 #include "ui/events/devices/x11/device_data_manager_x11.h"
6 6
7 #include <X11/extensions/XInput.h> 7 #include <X11/extensions/XInput.h>
8 #include <X11/extensions/XInput2.h> 8 #include <X11/extensions/XInput2.h>
9 #include <X11/Xlib.h> 9 #include <X11/Xlib.h>
10 10
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 touch_devices.begin(), touch_devices.end(), touch_device_id); 705 touch_devices.begin(), touch_devices.end(), touch_device_id);
706 return it != touch_devices.end() && it->type == INPUT_DEVICE_INTERNAL; 706 return it != touch_devices.end() && it->type == INPUT_DEVICE_INTERNAL;
707 #endif // defined(OS_CHROMEOS) 707 #endif // defined(OS_CHROMEOS)
708 return false; 708 return false;
709 } 709 }
710 710
711 void DeviceDataManagerX11::SetDisabledKeyboardAllowedKeys( 711 void DeviceDataManagerX11::SetDisabledKeyboardAllowedKeys(
712 scoped_ptr<std::set<KeyboardCode> > excepted_keys) { 712 scoped_ptr<std::set<KeyboardCode> > excepted_keys) {
713 DCHECK(!excepted_keys.get() || 713 DCHECK(!excepted_keys.get() ||
714 !blocked_keyboard_allowed_keys_.get()); 714 !blocked_keyboard_allowed_keys_.get());
715 blocked_keyboard_allowed_keys_ = excepted_keys.Pass(); 715 blocked_keyboard_allowed_keys_ = std::move(excepted_keys);
716 } 716 }
717 717
718 void DeviceDataManagerX11::DisableDevice(int deviceid) { 718 void DeviceDataManagerX11::DisableDevice(int deviceid) {
719 blocked_devices_.set(deviceid, true); 719 blocked_devices_.set(deviceid, true);
720 // TODO(rsadam@): Support blocking touchscreen devices. 720 // TODO(rsadam@): Support blocking touchscreen devices.
721 std::vector<KeyboardDevice> keyboards = keyboard_devices(); 721 std::vector<KeyboardDevice> keyboards = keyboard_devices();
722 std::vector<KeyboardDevice>::iterator it = 722 std::vector<KeyboardDevice>::iterator it =
723 FindDeviceWithId(keyboards.begin(), keyboards.end(), deviceid); 723 FindDeviceWithId(keyboards.begin(), keyboards.end(), deviceid);
724 if (it != std::end(keyboards)) { 724 if (it != std::end(keyboards)) {
725 blocked_keyboards_.insert( 725 blocked_keyboards_.insert(
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 } else { 784 } else {
785 keyboards.erase(it); 785 keyboards.erase(it);
786 ++blocked_iter; 786 ++blocked_iter;
787 } 787 }
788 } 788 }
789 // Notify base class of updated list. 789 // Notify base class of updated list.
790 DeviceDataManager::OnKeyboardDevicesUpdated(keyboards); 790 DeviceDataManager::OnKeyboardDevicesUpdated(keyboards);
791 } 791 }
792 792
793 } // namespace ui 793 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/test/in_process_context_factory.cc ('k') | ui/events/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698