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

Side by Side Diff: ui/events/event.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/events/devices/x11/device_data_manager_x11.cc ('k') | ui/events/event_processor_unittest.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 6
7 #include <utility>
8
7 #if defined(USE_X11) 9 #if defined(USE_X11)
8 #include <X11/extensions/XInput2.h> 10 #include <X11/extensions/XInput2.h>
9 #include <X11/keysym.h> 11 #include <X11/keysym.h>
10 #include <X11/Xlib.h> 12 #include <X11/Xlib.h>
11 #endif 13 #endif
12 14
13 #include <cmath> 15 #include <cmath>
14 #include <cstring> 16 #include <cstring>
15 17
16 #include "base/metrics/histogram.h" 18 #include "base/metrics/histogram.h"
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 756
755 if (rhs.extended_key_event_data_) 757 if (rhs.extended_key_event_data_)
756 extended_key_event_data_.reset(rhs.extended_key_event_data_->Clone()); 758 extended_key_event_data_.reset(rhs.extended_key_event_data_->Clone());
757 } 759 }
758 return *this; 760 return *this;
759 } 761 }
760 762
761 KeyEvent::~KeyEvent() {} 763 KeyEvent::~KeyEvent() {}
762 764
763 void KeyEvent::SetExtendedKeyEventData(scoped_ptr<ExtendedKeyEventData> data) { 765 void KeyEvent::SetExtendedKeyEventData(scoped_ptr<ExtendedKeyEventData> data) {
764 extended_key_event_data_ = data.Pass(); 766 extended_key_event_data_ = std::move(data);
765 } 767 }
766 768
767 void KeyEvent::ApplyLayout() const { 769 void KeyEvent::ApplyLayout() const {
768 ui::DomCode code = code_; 770 ui::DomCode code = code_;
769 if (code == DomCode::NONE) { 771 if (code == DomCode::NONE) {
770 // Catch old code that tries to do layout without a physical key, and try 772 // Catch old code that tries to do layout without a physical key, and try
771 // to recover using the KeyboardCode. Once key events are fully defined 773 // to recover using the KeyboardCode. Once key events are fully defined
772 // on construction (see TODO in event.h) this will go away. 774 // on construction (see TODO in event.h) this will go away.
773 VLOG(2) << "DomCode::NONE keycode=" << key_code_; 775 VLOG(2) << "DomCode::NONE keycode=" << key_code_;
774 code = UsLayoutKeyboardCodeToDomCode(key_code_); 776 code = UsLayoutKeyboardCodeToDomCode(key_code_);
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 gfx::PointF(x, y), 981 gfx::PointF(x, y),
980 time_stamp, 982 time_stamp,
981 flags | EF_FROM_TOUCH), 983 flags | EF_FROM_TOUCH),
982 details_(details) { 984 details_(details) {
983 } 985 }
984 986
985 GestureEvent::~GestureEvent() { 987 GestureEvent::~GestureEvent() {
986 } 988 }
987 989
988 } // namespace ui 990 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/devices/x11/device_data_manager_x11.cc ('k') | ui/events/event_processor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698