OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/chromeos/ime/candidate_window_view.h" | 5 #include "ui/chromeos/ime/candidate_window_view.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 CandidateWindowView::~CandidateWindowView() { | 190 CandidateWindowView::~CandidateWindowView() { |
191 } | 191 } |
192 | 192 |
193 views::Widget* CandidateWindowView::InitWidget() { | 193 views::Widget* CandidateWindowView::InitWidget() { |
194 views::Widget* widget = BubbleDelegateView::CreateBubble(this); | 194 views::Widget* widget = BubbleDelegateView::CreateBubble(this); |
195 | 195 |
196 wm::SetWindowVisibilityAnimationType( | 196 wm::SetWindowVisibilityAnimationType( |
197 widget->GetNativeView(), | 197 widget->GetNativeView(), |
198 wm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); | 198 wm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); |
199 | 199 |
200 GetBubbleFrameView()->SetBubbleBorder(scoped_ptr<views::BubbleBorder>( | 200 GetBubbleFrameView()->SetBubbleBorder(std::unique_ptr<views::BubbleBorder>( |
201 new CandidateWindowBorder(parent_window()))); | 201 new CandidateWindowBorder(parent_window()))); |
202 return widget; | 202 return widget; |
203 } | 203 } |
204 | 204 |
205 void CandidateWindowView::UpdateVisibility() { | 205 void CandidateWindowView::UpdateVisibility() { |
206 if (candidate_area_->visible() || auxiliary_text_->visible() || | 206 if (candidate_area_->visible() || auxiliary_text_->visible() || |
207 preedit_->visible()) { | 207 preedit_->visible()) { |
208 SizeToContents(); | 208 SizeToContents(); |
209 } else { | 209 } else { |
210 GetWidget()->Close(); | 210 GetWidget()->Close(); |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 for (size_t i = 0; i < candidate_views_.size(); ++i) { | 404 for (size_t i = 0; i < candidate_views_.size(); ++i) { |
405 if (sender == candidate_views_[i]) { | 405 if (sender == candidate_views_[i]) { |
406 FOR_EACH_OBSERVER(Observer, observers_, OnCandidateCommitted(i)); | 406 FOR_EACH_OBSERVER(Observer, observers_, OnCandidateCommitted(i)); |
407 return; | 407 return; |
408 } | 408 } |
409 } | 409 } |
410 } | 410 } |
411 | 411 |
412 } // namespace ime | 412 } // namespace ime |
413 } // namespace ui | 413 } // namespace ui |
OLD | NEW |