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

Side by Side Diff: ui/base/events/event.h

Issue 13957005: Move KeyIdentifier->KeyEvent conversion to src/ui/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: gyp fix Created 7 years, 8 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 | « chrome/chrome_tests_unit.gypi ('k') | ui/base/events/key_identifier_conversion.h » ('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 #ifndef UI_BASE_EVENTS_EVENT_H_ 5 #ifndef UI_BASE_EVENTS_EVENT_H_
6 #define UI_BASE_EVENTS_EVENT_H_ 6 #define UI_BASE_EVENTS_EVENT_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/event_types.h" 10 #include "base/event_types.h"
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 float rotation_angle_; 508 float rotation_angle_;
509 509
510 // Force (pressure) of the touch. Normalized to be [0, 1]. Default to be 0.0. 510 // Force (pressure) of the touch. Normalized to be [0, 1]. Default to be 0.0.
511 float force_; 511 float force_;
512 }; 512 };
513 513
514 class UI_EXPORT KeyEvent : public Event { 514 class UI_EXPORT KeyEvent : public Event {
515 public: 515 public:
516 KeyEvent(const base::NativeEvent& native_event, bool is_char); 516 KeyEvent(const base::NativeEvent& native_event, bool is_char);
517 517
518 // Used for synthetic events in testing. 518 // Used for synthetic events.
519 KeyEvent(EventType type, KeyboardCode key_code, int flags, bool is_char); 519 KeyEvent(EventType type, KeyboardCode key_code, int flags, bool is_char);
520 520
521 // These setters allow an I18N virtual keyboard to fabricate a keyboard event 521 // These setters allow an I18N virtual keyboard to fabricate a keyboard event
522 // which does not have a corresponding KeyboardCode (example: U+00E1 Latin 522 // which does not have a corresponding KeyboardCode (example: U+00E1 Latin
523 // small letter A with acute, U+0410 Cyrillic capital letter A.) 523 // small letter A with acute, U+0410 Cyrillic capital letter A.)
524 // GetCharacter() and GetUnmodifiedCharacter() return the character. 524 // GetCharacter() and GetUnmodifiedCharacter() return the character.
525 void set_character(uint16 character) { character_ = character; } 525 void set_character(uint16 character) { character_ = character; }
526 void set_unmodified_character(uint16 unmodified_character) { 526 void set_unmodified_character(uint16 unmodified_character) {
527 unmodified_character_ = unmodified_character; 527 unmodified_character_ = unmodified_character;
528 } 528 }
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 // This value is stored as a bitfield because the number of touch ids varies, 694 // This value is stored as a bitfield because the number of touch ids varies,
695 // but we currently don't need more than 32 touches at a time. 695 // but we currently don't need more than 32 touches at a time.
696 const unsigned int touch_ids_bitfield_; 696 const unsigned int touch_ids_bitfield_;
697 697
698 DISALLOW_COPY_AND_ASSIGN(GestureEvent); 698 DISALLOW_COPY_AND_ASSIGN(GestureEvent);
699 }; 699 };
700 700
701 } // namespace ui 701 } // namespace ui
702 702
703 #endif // UI_BASE_EVENTS_EVENT_H_ 703 #endif // UI_BASE_EVENTS_EVENT_H_
OLDNEW
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | ui/base/events/key_identifier_conversion.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698