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

Side by Side Diff: ash/ime/event.cc

Issue 8576005: IME (input method editor) support for Aura, part 3 of 3: Use ui::InputMethod in ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move to ash/ime/ Created 8 years, 12 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 | « ash/ime/event.h ('k') | ash/ime/input_method_event_filter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ash/ime/event.h"
6
7 namespace ash {
8
9 TranslatedKeyEvent::TranslatedKeyEvent(const base::NativeEvent& native_event,
10 bool is_char)
11 : KeyEvent(native_event, is_char) {
12 set_type(type() == ui::ET_KEY_PRESSED ?
13 ui::ET_TRANSLATED_KEY_PRESS : ui::ET_TRANSLATED_KEY_RELEASE);
14 }
15
16 TranslatedKeyEvent::TranslatedKeyEvent(bool is_press,
17 ui::KeyboardCode key_code,
18 int flags)
19 : KeyEvent((is_press ?
20 ui::ET_TRANSLATED_KEY_PRESS : ui::ET_TRANSLATED_KEY_RELEASE),
21 key_code,
22 flags) {
23 }
24
25 void TranslatedKeyEvent::ConvertToKeyEvent() {
26 set_type(type() == ui::ET_TRANSLATED_KEY_PRESS ?
27 ui::ET_KEY_PRESSED : ui::ET_KEY_RELEASED);
28 }
29
30 } // namespace ash
OLDNEW
« no previous file with comments | « ash/ime/event.h ('k') | ash/ime/input_method_event_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698