| 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 "ash/ime/candidate_window_view.h" | 5 #include "ash/ime/candidate_window_view.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "ash/ime/candidate_view.h" | 9 #include "ash/ime/candidate_view.h" |
| 10 #include "ash/ime/candidate_window_constants.h" | 10 #include "ash/ime/candidate_window_constants.h" |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 views::BoxLayout::kHorizontal, 0, 0, 0)); | 184 views::BoxLayout::kHorizontal, 0, 0, 0)); |
| 185 } | 185 } |
| 186 } | 186 } |
| 187 | 187 |
| 188 CandidateWindowView::~CandidateWindowView() { | 188 CandidateWindowView::~CandidateWindowView() { |
| 189 } | 189 } |
| 190 | 190 |
| 191 views::Widget* CandidateWindowView::InitWidget() { | 191 views::Widget* CandidateWindowView::InitWidget() { |
| 192 views::Widget* widget = BubbleDelegateView::CreateBubble(this); | 192 views::Widget* widget = BubbleDelegateView::CreateBubble(this); |
| 193 | 193 |
| 194 views::corewm::SetWindowVisibilityAnimationType( | 194 wm::SetWindowVisibilityAnimationType( |
| 195 widget->GetNativeView(), | 195 widget->GetNativeView(), |
| 196 views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); | 196 wm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); |
| 197 | 197 |
| 198 GetBubbleFrameView()->SetBubbleBorder(scoped_ptr<views::BubbleBorder>( | 198 GetBubbleFrameView()->SetBubbleBorder(scoped_ptr<views::BubbleBorder>( |
| 199 new CandidateWindowBorder(parent_window()))); | 199 new CandidateWindowBorder(parent_window()))); |
| 200 return widget; | 200 return widget; |
| 201 } | 201 } |
| 202 | 202 |
| 203 void CandidateWindowView::UpdateVisibility() { | 203 void CandidateWindowView::UpdateVisibility() { |
| 204 if (candidate_area_->visible() || auxiliary_text_->visible() || | 204 if (candidate_area_->visible() || auxiliary_text_->visible() || |
| 205 preedit_->visible()) { | 205 preedit_->visible()) { |
| 206 SizeToContents(); | 206 SizeToContents(); |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 for (size_t i = 0; i < candidate_views_.size(); ++i) { | 398 for (size_t i = 0; i < candidate_views_.size(); ++i) { |
| 399 if (sender == candidate_views_[i]) { | 399 if (sender == candidate_views_[i]) { |
| 400 FOR_EACH_OBSERVER(Observer, observers_, OnCandidateCommitted(i)); | 400 FOR_EACH_OBSERVER(Observer, observers_, OnCandidateCommitted(i)); |
| 401 return; | 401 return; |
| 402 } | 402 } |
| 403 } | 403 } |
| 404 } | 404 } |
| 405 | 405 |
| 406 } // namespace ime | 406 } // namespace ime |
| 407 } // namespace ash | 407 } // namespace ash |
| OLD | NEW |