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

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

Issue 2611773002: Removes code using mus client lib (Closed)
Patch Set: dont run on linux Created 3 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/views/mus/text_input_client_impl.h ('k') | ui/views/mus/unittests_aura_manifest.json » ('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 2016 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 "ui/views/mus/text_input_client_impl.h"
6
7 #include "base/strings/utf_string_conversions.h"
8 #include "ui/base/ime/text_input_client.h"
9 #include "ui/views/mus/input_method_mus.h"
10
11 namespace views {
12
13 TextInputClientImpl::TextInputClientImpl(ui::TextInputClient* text_input_client)
14 : text_input_client_(text_input_client), binding_(this) {}
15
16 TextInputClientImpl::~TextInputClientImpl() {}
17
18 ui::mojom::TextInputClientPtr TextInputClientImpl::CreateInterfacePtrAndBind() {
19 return binding_.CreateInterfacePtrAndBind();
20 }
21
22 void TextInputClientImpl::SetCompositionText(
23 const ui::CompositionText& composition) {
24 text_input_client_->SetCompositionText(composition);
25 }
26
27 void TextInputClientImpl::ConfirmCompositionText() {
28 text_input_client_->ConfirmCompositionText();
29 }
30
31 void TextInputClientImpl::ClearCompositionText() {
32 text_input_client_->ClearCompositionText();
33 }
34
35 void TextInputClientImpl::InsertText(const std::string& text) {
36 text_input_client_->InsertText(base::UTF8ToUTF16(text));
37 }
38
39 void TextInputClientImpl::InsertChar(std::unique_ptr<ui::Event> event) {
40 DCHECK(event->IsKeyEvent());
41 text_input_client_->InsertChar(*event->AsKeyEvent());
42 }
43
44 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/mus/text_input_client_impl.h ('k') | ui/views/mus/unittests_aura_manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698