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

Unified Diff: ui/events/event.cc

Issue 142043006: Refactors ui::internal::InputMethodDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed an issue of unsigned/signed comparison. Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/event.h ('k') | ui/views/corewm/input_method_event_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/event.cc
diff --git a/ui/events/event.cc b/ui/events/event.cc
index 1acff02c7a7d289d3970bbcfe8452c1f30874a3b..eccaa6eef5456588b9a309b6acd4f54757f12c50 100644
--- a/ui/events/event.cc
+++ b/ui/events/event.cc
@@ -639,6 +639,13 @@ TranslatedKeyEvent::TranslatedKeyEvent(bool is_press,
false) {
}
+TranslatedKeyEvent::TranslatedKeyEvent(const KeyEvent& key_event)
+ : KeyEvent(key_event) {
+ SetType(type() == ET_KEY_PRESSED ?
+ ET_TRANSLATED_KEY_PRESS : ET_TRANSLATED_KEY_RELEASE);
+ set_is_char(false);
+}
+
void TranslatedKeyEvent::ConvertToKeyEvent() {
SetType(type() == ET_TRANSLATED_KEY_PRESS ?
ET_KEY_PRESSED : ET_KEY_RELEASED);
« no previous file with comments | « ui/events/event.h ('k') | ui/views/corewm/input_method_event_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698