OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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/views/mus/input_method_mus.h" | 5 #include "ui/views/mus/input_method_mus.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "services/ui/public/cpp/window.h" | 9 #include "services/ui/public/cpp/window.h" |
10 #include "services/ui/public/interfaces/ime.mojom.h" | 10 #include "services/ui/public/interfaces/ime.mojom.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 InputMethodMus::InputMethodMus(ui::internal::InputMethodDelegate* delegate, | 22 InputMethodMus::InputMethodMus(ui::internal::InputMethodDelegate* delegate, |
23 ui::Window* window) | 23 ui::Window* window) |
24 : window_(window) { | 24 : window_(window) { |
25 SetDelegate(delegate); | 25 SetDelegate(delegate); |
26 } | 26 } |
27 | 27 |
28 InputMethodMus::~InputMethodMus() {} | 28 InputMethodMus::~InputMethodMus() {} |
29 | 29 |
30 void InputMethodMus::Init(shell::Connector* connector) { | 30 void InputMethodMus::Init(shell::Connector* connector) { |
31 connector->ConnectToInterface("mojo:ui", &ime_server_); | 31 connector->ConnectToInterface("service:ui", &ime_server_); |
32 } | 32 } |
33 | 33 |
34 //////////////////////////////////////////////////////////////////////////////// | 34 //////////////////////////////////////////////////////////////////////////////// |
35 // InputMethodMus, ui::InputMethod implementation: | 35 // InputMethodMus, ui::InputMethod implementation: |
36 | 36 |
37 void InputMethodMus::OnFocus() { | 37 void InputMethodMus::OnFocus() { |
38 InputMethodBase::OnFocus(); | 38 InputMethodBase::OnFocus(); |
39 UpdateTextInputType(); | 39 UpdateTextInputType(); |
40 } | 40 } |
41 | 41 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 state->type = mojo::ConvertTo<mojo::TextInputType>(type); | 125 state->type = mojo::ConvertTo<mojo::TextInputType>(type); |
126 if (window_) { | 126 if (window_) { |
127 if (type != ui::TEXT_INPUT_TYPE_NONE) | 127 if (type != ui::TEXT_INPUT_TYPE_NONE) |
128 window_->SetImeVisibility(true, std::move(state)); | 128 window_->SetImeVisibility(true, std::move(state)); |
129 else | 129 else |
130 window_->SetTextInputState(std::move(state)); | 130 window_->SetTextInputState(std::move(state)); |
131 } | 131 } |
132 } | 132 } |
133 | 133 |
134 } // namespace views | 134 } // namespace views |
OLD | NEW |