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 #include "chrome/browser/chromeos/input_method/candidate_window_view.h" | 4 #include "chrome/browser/chromeos/input_method/candidate_window_view.h" |
5 | 5 |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/chromeos/input_method/candidate_view.h" | 9 #include "chrome/browser/chromeos/input_method/candidate_view.h" |
10 #include "chrome/browser/chromeos/input_method/candidate_window_constants.h" | 10 #include "chrome/browser/chromeos/input_method/candidate_window_constants.h" |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 if (candidate_area_->visible() || auxiliary_text_->visible() || | 201 if (candidate_area_->visible() || auxiliary_text_->visible() || |
202 preedit_->visible()) { | 202 preedit_->visible()) { |
203 SizeToContents(); | 203 SizeToContents(); |
204 } else { | 204 } else { |
205 GetWidget()->Close(); | 205 GetWidget()->Close(); |
206 } | 206 } |
207 } | 207 } |
208 | 208 |
209 void CandidateWindowView::HideLookupTable() { | 209 void CandidateWindowView::HideLookupTable() { |
210 candidate_area_->SetVisible(false); | 210 candidate_area_->SetVisible(false); |
| 211 auxiliary_text_->SetVisible(false); |
211 UpdateVisibility(); | 212 UpdateVisibility(); |
212 } | 213 } |
213 | 214 |
214 void CandidateWindowView::HidePreeditText() { | 215 void CandidateWindowView::HidePreeditText() { |
215 preedit_->SetVisible(false); | 216 preedit_->SetVisible(false); |
216 UpdateVisibility(); | 217 UpdateVisibility(); |
217 } | 218 } |
218 | 219 |
219 void CandidateWindowView::ShowPreeditText() { | 220 void CandidateWindowView::ShowPreeditText() { |
220 preedit_->SetVisible(true); | 221 preedit_->SetVisible(true); |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 for (size_t i = 0; i < candidate_views_.size(); ++i) { | 394 for (size_t i = 0; i < candidate_views_.size(); ++i) { |
394 if (sender == candidate_views_[i]) { | 395 if (sender == candidate_views_[i]) { |
395 FOR_EACH_OBSERVER(Observer, observers_, OnCandidateCommitted(i)); | 396 FOR_EACH_OBSERVER(Observer, observers_, OnCandidateCommitted(i)); |
396 return; | 397 return; |
397 } | 398 } |
398 } | 399 } |
399 } | 400 } |
400 | 401 |
401 } // namespace input_method | 402 } // namespace input_method |
402 } // namespace chromeos | 403 } // namespace chromeos |
OLD | NEW |