| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/base/ime/remote_input_method_win.h" | 5 #include "ui/base/ime/remote_input_method_win.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/observer_list.h" | 8 #include "base/observer_list.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "base/win/metro.h" | 10 #include "base/win/metro.h" |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 | 294 |
| 295 // Sync initial state. | 295 // Sync initial state. |
| 296 if (remote_delegate_) { | 296 if (remote_delegate_) { |
| 297 remote_delegate_->OnTextInputClientUpdated( | 297 remote_delegate_->OnTextInputClientUpdated( |
| 298 input_scopes_, composition_character_bounds_); | 298 input_scopes_, composition_character_bounds_); |
| 299 } | 299 } |
| 300 } | 300 } |
| 301 | 301 |
| 302 void OnCandidatePopupChanged(bool visible) override { | 302 void OnCandidatePopupChanged(bool visible) override { |
| 303 is_candidate_popup_open_ = visible; | 303 is_candidate_popup_open_ = visible; |
| 304 if (!text_input_client_) | |
| 305 return; | |
| 306 // TODO(kochi): Support 'update' case, in addition to show/hide. | |
| 307 // http://crbug.com/238585 | |
| 308 if (visible) | |
| 309 text_input_client_->OnCandidateWindowShown(); | |
| 310 else | |
| 311 text_input_client_->OnCandidateWindowHidden(); | |
| 312 } | 304 } |
| 313 | 305 |
| 314 void OnInputSourceChanged(LANGID langid, bool /*is_ime*/) override { | 306 void OnInputSourceChanged(LANGID langid, bool /*is_ime*/) override { |
| 315 // Note: Currently |is_ime| is not utilized yet. | 307 // Note: Currently |is_ime| is not utilized yet. |
| 316 const bool changed = (langid_ != langid); | 308 const bool changed = (langid_ != langid); |
| 317 langid_ = langid; | 309 langid_ = langid; |
| 318 if (changed && GetTextInputClient()) | 310 if (changed && GetTextInputClient()) |
| 319 GetTextInputClient()->OnInputMethodChanged(); | 311 GetTextInputClient()->OnInputMethodChanged(); |
| 320 } | 312 } |
| 321 | 313 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 return make_scoped_ptr(new RemoteInputMethodWin(delegate)); | 379 return make_scoped_ptr(new RemoteInputMethodWin(delegate)); |
| 388 } | 380 } |
| 389 | 381 |
| 390 // static | 382 // static |
| 391 RemoteInputMethodPrivateWin* RemoteInputMethodPrivateWin::Get( | 383 RemoteInputMethodPrivateWin* RemoteInputMethodPrivateWin::Get( |
| 392 InputMethod* input_method) { | 384 InputMethod* input_method) { |
| 393 return GetPrivate(input_method); | 385 return GetPrivate(input_method); |
| 394 } | 386 } |
| 395 | 387 |
| 396 } // namespace ui | 388 } // namespace ui |
| OLD | NEW |