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

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

Issue 7942004: Consolidate/cleanup event cracking code; single out GdkEvents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge removal of compact nav. Created 9 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « ui/views/events/event.h ('k') | ui/views/events/event_win.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/views/events/event.h" 5 #include "ui/views/events/event.h"
6 6
7 #include "ui/views/view.h" 7 #include "ui/views/view.h"
8 8
9 namespace ui { 9 namespace ui {
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 View* source, 43 View* source,
44 View* target) 44 View* target)
45 : Event(other.type(), other.flags()) { 45 : Event(other.type(), other.flags()) {
46 location_ = other.location(); 46 location_ = other.location();
47 View::ConvertPointToView(*source, *target, &location_); 47 View::ConvertPointToView(*source, *target, &location_);
48 } 48 }
49 49
50 //////////////////////////////////////////////////////////////////////////////// 50 ////////////////////////////////////////////////////////////////////////////////
51 // MouseEvent, public: 51 // MouseEvent, public:
52 52
53 MouseEvent::MouseEvent(const ui::NativeEvent& native_event)
54 : LocatedEvent(ui::EventTypeFromNative(native_event),
55 ui::EventLocationFromNative(native_event),
56 ui::EventFlagsFromNative(native_event)) {
57 }
58
53 MouseEvent::MouseEvent(const MouseEvent& other, View* source, View* target) 59 MouseEvent::MouseEvent(const MouseEvent& other, View* source, View* target)
54 : LocatedEvent(other, source, target) { 60 : LocatedEvent(other, source, target) {
55 } 61 }
56 62
63 KeyEvent::KeyEvent(const ui::NativeEvent& native_event)
64 : Event(ui::EventTypeFromNative(native_event),
65 ui::EventFlagsFromNative(native_event)),
66 key_code_(ui::KeyboardCodeFromNative(native_event)) {
67 }
68
69 MouseWheelEvent::MouseWheelEvent(const ui::NativeEvent& native_event)
70 : LocatedEvent(ui::EventTypeFromNative(native_event),
71 ui::EventLocationFromNative(native_event),
72 ui::EventFlagsFromNative(native_event)),
73 offset_(ui::GetMouseWheelOffset(native_event)) {
74 }
75
57 } // namespace ui 76 } // namespace ui
OLDNEW
« no previous file with comments | « ui/views/events/event.h ('k') | ui/views/events/event_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698