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

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

Issue 1560293002: Rename KEY_ constants to avoid conflict with <linux/input.h> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments (Wez) Created 4 years, 11 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
« no previous file with comments | « ui/base/ime/chromeos/character_composer_unittest.cc ('k') | ui/events/event_unittest.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) 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_EVENTS_EVENT_H_ 5 #ifndef UI_EVENTS_EVENT_H_
6 #define UI_EVENTS_EVENT_H_ 6 #define UI_EVENTS_EVENT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 803
804 // This allows a subclass TranslatedKeyEvent to be a non character event. 804 // This allows a subclass TranslatedKeyEvent to be a non character event.
805 void set_is_char(bool is_char) { is_char_ = is_char; } 805 void set_is_char(bool is_char) { is_char_ = is_char; }
806 806
807 private: 807 private:
808 // Determine key_ on a keystroke event from code_ and flags(). 808 // Determine key_ on a keystroke event from code_ and flags().
809 void ApplyLayout() const; 809 void ApplyLayout() const;
810 810
811 KeyboardCode key_code_; 811 KeyboardCode key_code_;
812 812
813 // DOM KeyboardEvent |code| (e.g. DomCode::KEY_A, DomCode::SPACE). 813 // DOM KeyboardEvent |code| (e.g. DomCode::US_A, DomCode::SPACE).
814 // http://www.w3.org/TR/DOM-Level-3-Events-code/ 814 // http://www.w3.org/TR/DOM-Level-3-Events-code/
815 // 815 //
816 // This value represents the physical position in the keyboard and can be 816 // This value represents the physical position in the keyboard and can be
817 // converted from / to keyboard scan code like XKB. 817 // converted from / to keyboard scan code like XKB.
818 DomCode code_; 818 DomCode code_;
819 819
820 // True if this is a character event, false if this is a keystroke event. 820 // True if this is a character event, false if this is a keystroke event.
821 bool is_char_ = false; 821 bool is_char_ = false;
822 822
823 // TODO(kpschoedel): refactor so that key_ is not mutable. 823 // TODO(kpschoedel): refactor so that key_ is not mutable.
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 914
915 const GestureEventDetails& details() const { return details_; } 915 const GestureEventDetails& details() const { return details_; }
916 916
917 private: 917 private:
918 GestureEventDetails details_; 918 GestureEventDetails details_;
919 }; 919 };
920 920
921 } // namespace ui 921 } // namespace ui
922 922
923 #endif // UI_EVENTS_EVENT_H_ 923 #endif // UI_EVENTS_EVENT_H_
OLDNEW
« no previous file with comments | « ui/base/ime/chromeos/character_composer_unittest.cc ('k') | ui/events/event_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698