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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
90 void InputMethodMus::OnCaretBoundsChanged(const ui::TextInputClient* client) { | 90 void InputMethodMus::OnCaretBoundsChanged(const ui::TextInputClient* client) { |
91 if (input_method_) | 91 if (input_method_) |
92 input_method_->OnCaretBoundsChanged(client->GetCaretBounds()); | 92 input_method_->OnCaretBoundsChanged(client->GetCaretBounds()); |
93 } | 93 } |
94 | 94 |
95 void InputMethodMus::CancelComposition(const ui::TextInputClient* client) { | 95 void InputMethodMus::CancelComposition(const ui::TextInputClient* client) { |
96 if (input_method_) | 96 if (input_method_) |
97 input_method_->CancelComposition(); | 97 input_method_->CancelComposition(); |
98 } | 98 } |
99 | 99 |
100 void InputMethodMus::OnInputLocaleChanged() { | |
sky
2016/09/01 18:23:43
Leave this one here because of the TODO.
Shu Chen
2016/09/07 03:13:34
Done.
| |
101 // TODO(moshayedi): crbug.com/637418. Not supported in ChromeOS. Investigate | |
102 // whether we want to support this or not. | |
103 } | |
104 | |
105 std::string InputMethodMus::GetInputLocale() { | |
106 // TODO(moshayedi): crbug.com/637418. Not supported in ChromeOS. Investigate | |
107 // whether we want to support this or not. | |
108 return std::string(); | |
109 } | |
110 | |
111 bool InputMethodMus::IsCandidatePopupOpen() const { | 100 bool InputMethodMus::IsCandidatePopupOpen() const { |
112 // TODO(moshayedi): crbug.com/637416. Implement this properly when we have a | 101 // TODO(moshayedi): crbug.com/637416. Implement this properly when we have a |
113 // mean for displaying candidate list popup. | 102 // mean for displaying candidate list popup. |
114 return false; | 103 return false; |
115 } | 104 } |
116 | 105 |
117 void InputMethodMus::OnDidChangeFocusedClient( | 106 void InputMethodMus::OnDidChangeFocusedClient( |
118 ui::TextInputClient* focused_before, | 107 ui::TextInputClient* focused_before, |
119 ui::TextInputClient* focused) { | 108 ui::TextInputClient* focused) { |
120 InputMethodBase::OnDidChangeFocusedClient(focused_before, focused); | 109 InputMethodBase::OnDidChangeFocusedClient(focused_before, focused); |
(...skipping 10 matching lines...) Expand all Loading... | |
131 state->type = mojo::ConvertTo<mojo::TextInputType>(type); | 120 state->type = mojo::ConvertTo<mojo::TextInputType>(type); |
132 if (window_) { | 121 if (window_) { |
133 if (type != ui::TEXT_INPUT_TYPE_NONE) | 122 if (type != ui::TEXT_INPUT_TYPE_NONE) |
134 window_->SetImeVisibility(true, std::move(state)); | 123 window_->SetImeVisibility(true, std::move(state)); |
135 else | 124 else |
136 window_->SetTextInputState(std::move(state)); | 125 window_->SetTextInputState(std::move(state)); |
137 } | 126 } |
138 } | 127 } |
139 | 128 |
140 } // namespace views | 129 } // namespace views |
OLD | NEW |