| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/chromeos/input_method/candidate_window_controller_impl.
h" | 5 #include "chrome/browser/chromeos/input_method/candidate_window_controller_impl.
h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/common/shell_window_ids.h" | 10 #include "ash/common/shell_window_ids.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 // Remember the cursor bounds. | 89 // Remember the cursor bounds. |
| 90 if (candidate_window_view_) | 90 if (candidate_window_view_) |
| 91 candidate_window_view_->SetCursorBounds(cursor_bounds, composition_head); | 91 candidate_window_view_->SetCursorBounds(cursor_bounds, composition_head); |
| 92 | 92 |
| 93 // Mode indicator controller also needs the cursor bounds. | 93 // Mode indicator controller also needs the cursor bounds. |
| 94 mode_indicator_controller_->SetCursorBounds(cursor_bounds); | 94 mode_indicator_controller_->SetCursorBounds(cursor_bounds); |
| 95 } | 95 } |
| 96 | 96 |
| 97 void CandidateWindowControllerImpl::FocusStateChanged(bool is_focused) { | 97 void CandidateWindowControllerImpl::FocusStateChanged(bool is_focused) { |
| 98 mode_indicator_controller_->FocusStateChanged(is_focused); | 98 mode_indicator_controller_->FocusStateChanged(is_focused); |
| 99 if (candidate_window_view_) |
| 100 candidate_window_view_->HidePreeditText(); |
| 99 } | 101 } |
| 100 | 102 |
| 101 void CandidateWindowControllerImpl::UpdateLookupTable( | 103 void CandidateWindowControllerImpl::UpdateLookupTable( |
| 102 const ui::CandidateWindow& candidate_window, | 104 const ui::CandidateWindow& candidate_window, |
| 103 bool visible) { | 105 bool visible) { |
| 104 // If it's not visible, hide the lookup table and return. | 106 // If it's not visible, hide the lookup table and return. |
| 105 if (!visible) { | 107 if (!visible) { |
| 106 if (candidate_window_view_) | 108 if (candidate_window_view_) |
| 107 candidate_window_view_->HideLookupTable(); | 109 candidate_window_view_->HideLookupTable(); |
| 108 if (infolist_window_) | 110 if (infolist_window_) |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 observers_.AddObserver(observer); | 191 observers_.AddObserver(observer); |
| 190 } | 192 } |
| 191 | 193 |
| 192 void CandidateWindowControllerImpl::RemoveObserver( | 194 void CandidateWindowControllerImpl::RemoveObserver( |
| 193 CandidateWindowController::Observer* observer) { | 195 CandidateWindowController::Observer* observer) { |
| 194 observers_.RemoveObserver(observer); | 196 observers_.RemoveObserver(observer); |
| 195 } | 197 } |
| 196 | 198 |
| 197 } // namespace input_method | 199 } // namespace input_method |
| 198 } // namespace chromeos | 200 } // namespace chromeos |
| OLD | NEW |