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

Side by Side Diff: ui/aura/mus/text_input_client_impl.cc

Issue 2557493002: IME for Mus: Use ui::InputMethodChromeOS to provide logic for ime driver. (Closed)
Patch Set: More cleanup. Created 4 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "ui/aura/mus/text_input_client_impl.h" 5 #include "ui/aura/mus/text_input_client_impl.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "ui/aura/mus/input_method_mus.h" 8 #include "ui/aura/mus/input_method_mus.h"
9 #include "ui/base/ime/text_input_client.h" 9 #include "ui/base/ime/text_input_client.h"
10 10
(...skipping 20 matching lines...) Expand all
31 void TextInputClientImpl::ClearCompositionText() { 31 void TextInputClientImpl::ClearCompositionText() {
32 text_input_client_->ClearCompositionText(); 32 text_input_client_->ClearCompositionText();
33 } 33 }
34 34
35 void TextInputClientImpl::InsertText(const std::string& text) { 35 void TextInputClientImpl::InsertText(const std::string& text) {
36 text_input_client_->InsertText(base::UTF8ToUTF16(text)); 36 text_input_client_->InsertText(base::UTF8ToUTF16(text));
37 } 37 }
38 38
39 void TextInputClientImpl::InsertChar(std::unique_ptr<ui::Event> event) { 39 void TextInputClientImpl::InsertChar(std::unique_ptr<ui::Event> event) {
40 DCHECK(event->IsKeyEvent()); 40 DCHECK(event->IsKeyEvent());
41 ui::KeyEvent* key_event = event->AsKeyEvent(); 41 text_input_client_->InsertChar(*event->AsKeyEvent());
42 DCHECK(key_event->is_char());
sadrul 2016/12/12 18:50:15 Why remove the DCHECK?
43 text_input_client_->InsertChar(*key_event);
44 } 42 }
45 43
46 } // namespace aura 44 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698