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

Side by Side Diff: views/events/event_aura.cc

Issue 8190012: make browser_tests and interaction_ui_tests compile and link under use_aura=1 chromeos=0. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: 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
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 "views/events/event.h" 5 #include "views/events/event.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/aura/event.h" 8 #include "ui/aura/event.h"
9 9
10 namespace views { 10 namespace views {
11 11
12 //////////////////////////////////////////////////////////////////////////////// 12 ////////////////////////////////////////////////////////////////////////////////
13 // LocatedEvent, protected: 13 // LocatedEvent, protected:
14 14
15 LocatedEvent::LocatedEvent(const NativeEvent& native_event) 15 LocatedEvent::LocatedEvent(const NativeEvent& native_event)
16 : Event(native_event, native_event->type(), native_event->flags()), 16 : Event(native_event, native_event->type(), native_event->flags()),
17 location_(static_cast<aura::LocatedEvent*>(native_event)->location()) { 17 location_(static_cast<aura::LocatedEvent*>(native_event)->location()) {
18 } 18 }
19 19
20 //////////////////////////////////////////////////////////////////////////////// 20 ////////////////////////////////////////////////////////////////////////////////
21 // KeyEvent, public: 21 // KeyEvent, public:
22 22
23 KeyEvent::KeyEvent(const NativeEvent& native_event) 23 KeyEvent::KeyEvent(const NativeEvent& native_event)
24 : Event(native_event, native_event->type(), native_event->flags()), 24 : Event(native_event, native_event->type(), native_event->flags()),
25 key_code_(static_cast<aura::KeyEvent*>(native_event)->key_code()), 25 key_code_(static_cast<aura::KeyEvent*>(native_event)->key_code()),
26 character_(0), 26 character_(0),
27 unmodified_character_(0) { 27 unmodified_character_(GetCharacterFromKeyCode(
28 } 28 key_code_,
29 static_cast<aura::KeyEvent*>(native_event)->flags())) {
30 }
31
32 //KeyEvent::KeyEvent(const NativeEvent& native_event)
33 // : Event(native_event->type(), native_event->flags()),
34 // key_code_(static_cast<aura::KeyEvent*>(native_event)->key_code()),
35 // unmodified_character_(0) {
36 // character_ = GetCharacterFromKeyCode(key_code_, native_event->flags()); }
37 // character_(0),
38 // unmodified_character_(0) {
39 // }
Emmanuel Saint-loubert-Bié 2011/10/07 14:19:10 remove old code
alicet1 2011/10/07 15:30:31 oh, actually, this file should not be included, so
29 40
30 uint16 KeyEvent::GetCharacter() const { 41 uint16 KeyEvent::GetCharacter() const {
31 return character_; 42 return character_;
32 } 43 }
33 44
34 uint16 KeyEvent::GetUnmodifiedCharacter() const { 45 uint16 KeyEvent::GetUnmodifiedCharacter() const {
35 return unmodified_character_; 46 if (unmodified_character_)
47 return unmodified_character_;
48 return GetCharacterFromKeyCode(key_code(), flags());
36 } 49 }
37 50
38 //////////////////////////////////////////////////////////////////////////////// 51 ////////////////////////////////////////////////////////////////////////////////
39 // MouseWheelEvent, public: 52 // MouseWheelEvent, public:
40 53
41 MouseWheelEvent::MouseWheelEvent(const NativeEvent& native_event) 54 MouseWheelEvent::MouseWheelEvent(const NativeEvent& native_event)
42 : MouseEvent(native_event), 55 : MouseEvent(native_event),
43 offset_(0 /* TODO(beng): obtain */) { 56 offset_(0 /* TODO(beng): obtain */) {
44 } 57 }
45 58
46 } // namespace views 59 } // namespace views
OLDNEW
« ui/base/clipboard/clipboard_aura.cc ('K') | « ui/base/clipboard/clipboard_aura.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698