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

Side by Side Diff: ui/events/event.cc

Issue 2049053003: Remove IPC::ParamTraits for ui::Event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 (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> 7 #include <utility>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 10
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 kMaxAutoRepeatTimeMs) { 976 kMaxAutoRepeatTimeMs) {
977 last_key_event_->set_time_stamp(event.time_stamp()); 977 last_key_event_->set_time_stamp(event.time_stamp());
978 last_key_event_->set_flags(last_key_event_->flags() | ui::EF_IS_REPEAT); 978 last_key_event_->set_flags(last_key_event_->flags() | ui::EF_IS_REPEAT);
979 return true; 979 return true;
980 } 980 }
981 delete last_key_event_; 981 delete last_key_event_;
982 last_key_event_ = new KeyEvent(event); 982 last_key_event_ = new KeyEvent(event);
983 return false; 983 return false;
984 } 984 }
985 985
986 KeyEvent::KeyEvent(EventType type, base::TimeDelta time_stamp, int flags)
987 : Event(type, time_stamp, flags) {}
988
989 KeyEvent::KeyEvent(const base::NativeEvent& native_event) 986 KeyEvent::KeyEvent(const base::NativeEvent& native_event)
990 : Event(native_event, 987 : Event(native_event,
991 EventTypeFromNative(native_event), 988 EventTypeFromNative(native_event),
992 EventFlagsFromNative(native_event)), 989 EventFlagsFromNative(native_event)),
993 key_code_(KeyboardCodeFromNative(native_event)), 990 key_code_(KeyboardCodeFromNative(native_event)),
994 code_(CodeFromNative(native_event)), 991 code_(CodeFromNative(native_event)),
995 is_char_(IsCharFromNative(native_event)) { 992 is_char_(IsCharFromNative(native_event)) {
996 if (IsRepeated(*this)) 993 if (IsRepeated(*this))
997 set_flags(flags() | ui::EF_IS_REPEAT); 994 set_flags(flags() | ui::EF_IS_REPEAT);
998 995
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
1287 gfx::PointF(x, y), 1284 gfx::PointF(x, y),
1288 time_stamp, 1285 time_stamp,
1289 flags | EF_FROM_TOUCH), 1286 flags | EF_FROM_TOUCH),
1290 details_(details) { 1287 details_(details) {
1291 } 1288 }
1292 1289
1293 GestureEvent::~GestureEvent() { 1290 GestureEvent::~GestureEvent() {
1294 } 1291 }
1295 1292
1296 } // namespace ui 1293 } // namespace ui
OLDNEW
« components/mus/DEPS ('K') | « ui/events/event.h ('k') | ui/events/gesture_event_details.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698