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

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

Issue 97963002: events: Remove KeyEvent::Copy(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years 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) 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 "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 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 521
522 // This allows an I18N virtual keyboard to fabricate a keyboard event that 522 // This allows an I18N virtual keyboard to fabricate a keyboard event that
523 // does not have a corresponding KeyboardCode (example: U+00E1 Latin small 523 // does not have a corresponding KeyboardCode (example: U+00E1 Latin small
524 // letter A with acute, U+0410 Cyrillic capital letter A). 524 // letter A with acute, U+0410 Cyrillic capital letter A).
525 void set_character(uint16 character) { character_ = character; } 525 void set_character(uint16 character) { character_ = character; }
526 526
527 // Gets the character generated by this key event. It only supports Unicode 527 // Gets the character generated by this key event. It only supports Unicode
528 // BMP characters. 528 // BMP characters.
529 uint16 GetCharacter() const; 529 uint16 GetCharacter() const;
530 530
531 // Returns the copy of this key event. Used in NativeWebKeyboardEvent.
532 KeyEvent* Copy() const;
533
534 KeyboardCode key_code() const { return key_code_; } 531 KeyboardCode key_code() const { return key_code_; }
535 bool is_char() const { return is_char_; } 532 bool is_char() const { return is_char_; }
536 533
537 // This is only intended to be used externally by classes that are modifying 534 // This is only intended to be used externally by classes that are modifying
538 // events in EventFilter::PreHandleKeyEvent(). set_character() should also be 535 // events in EventFilter::PreHandleKeyEvent(). set_character() should also be
539 // called. 536 // called.
540 void set_key_code(KeyboardCode key_code) { key_code_ = key_code; } 537 void set_key_code(KeyboardCode key_code) { key_code_ = key_code; }
541 538
542 // Returns true for [Alt]+<num-pad digit> Unicode alt key codes used by Win. 539 // Returns true for [Alt]+<num-pad digit> Unicode alt key codes used by Win.
543 // TODO(msw): Additional work may be needed for analogues on other platforms. 540 // TODO(msw): Additional work may be needed for analogues on other platforms.
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 // The set of indices of ones in the binary representation of 667 // The set of indices of ones in the binary representation of
671 // touch_ids_bitfield_ is the set of touch_ids associate with this gesture. 668 // touch_ids_bitfield_ is the set of touch_ids associate with this gesture.
672 // This value is stored as a bitfield because the number of touch ids varies, 669 // This value is stored as a bitfield because the number of touch ids varies,
673 // but we currently don't need more than 32 touches at a time. 670 // but we currently don't need more than 32 touches at a time.
674 const unsigned int touch_ids_bitfield_; 671 const unsigned int touch_ids_bitfield_;
675 }; 672 };
676 673
677 } // namespace ui 674 } // namespace ui
678 675
679 #endif // UI_EVENTS_EVENT_H_ 676 #endif // UI_EVENTS_EVENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698