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

Side by Side Diff: aura/event.cc

Issue 7886042: Move Aura to UI subdir. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 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 | « aura/event.h ('k') | aura/event_win.cc » ('j') | ui/aura/aura.gyp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "aura/event.h"
6
7 #include "aura/window.h"
8
9 namespace aura {
10
11 Event::Event(ui::EventType type, int flags)
12 : type_(type),
13 time_stamp_(base::Time::NowFromSystemTime()),
14 flags_(flags) {
15 Init();
16 }
17
18 Event::Event(NativeEvent native_event, ui::EventType type, int flags)
19 : type_(type),
20 time_stamp_(base::Time::NowFromSystemTime()),
21 flags_(flags) {
22 InitWithNativeEvent(native_event);
23 }
24
25 Event::Event(const Event& copy)
26 : native_event_(copy.native_event_),
27 type_(copy.type_),
28 time_stamp_(copy.time_stamp_),
29 flags_(copy.flags_) {
30 }
31
32 LocatedEvent::LocatedEvent(const LocatedEvent& model,
33 Window* source,
34 Window* target)
35 : Event(model),
36 location_(model.location_) {
37 if (target && target != source)
38 Window::ConvertPointToWindow(source, target, &location_);
39 }
40
41 LocatedEvent::LocatedEvent(ui::EventType type,
42 const gfx::Point& location,
43 int flags)
44 : Event(type, flags),
45 location_(location) {
46 }
47
48 MouseEvent::MouseEvent(const MouseEvent& model, Window* source, Window* target)
49 : LocatedEvent(model, source, target) {
50 }
51
52 MouseEvent::MouseEvent(ui::EventType type,
53 const gfx::Point& location,
54 int flags)
55 : LocatedEvent(type, location, flags) {
56 }
57
58 KeyEvent::KeyEvent(ui::EventType type,
59 ui::KeyboardCode key_code,
60 int flags)
61 : Event(type, flags),
62 key_code_(key_code) {
63 }
64
65 } // namespace aura
66
OLDNEW
« no previous file with comments | « aura/event.h ('k') | aura/event_win.cc » ('j') | ui/aura/aura.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698