| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 SetBorder(views::Border::CreateSolidSidedBorder( | 123 SetBorder(views::Border::CreateSolidSidedBorder( |
| 124 (position == TOP) ? 1 : 0, | 124 (position == TOP) ? 1 : 0, |
| 125 0, | 125 0, |
| 126 (position == BOTTOM) ? 1 : 0, | 126 (position == BOTTOM) ? 1 : 0, |
| 127 0, | 127 0, |
| 128 GetNativeTheme()->GetSystemColor( | 128 GetNativeTheme()->GetSystemColor( |
| 129 ui::NativeTheme::kColorId_MenuBorderColor))); | 129 ui::NativeTheme::kColorId_MenuBorderColor))); |
| 130 } | 130 } |
| 131 | 131 |
| 132 protected: | 132 protected: |
| 133 virtual gfx::Size GetPreferredSize() OVERRIDE { | 133 virtual gfx::Size GetPreferredSize() const OVERRIDE { |
| 134 gfx::Size size = views::View::GetPreferredSize(); | 134 gfx::Size size = views::View::GetPreferredSize(); |
| 135 size.SetToMax(gfx::Size(min_width_, 0)); | 135 size.SetToMax(gfx::Size(min_width_, 0)); |
| 136 return size; | 136 return size; |
| 137 } | 137 } |
| 138 | 138 |
| 139 private: | 139 private: |
| 140 views::Label* label_; | 140 views::Label* label_; |
| 141 int min_width_; | 141 int min_width_; |
| 142 | 142 |
| 143 DISALLOW_COPY_AND_ASSIGN(InformationTextArea); | 143 DISALLOW_COPY_AND_ASSIGN(InformationTextArea); |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 for (size_t i = 0; i < candidate_views_.size(); ++i) { | 399 for (size_t i = 0; i < candidate_views_.size(); ++i) { |
| 400 if (sender == candidate_views_[i]) { | 400 if (sender == candidate_views_[i]) { |
| 401 FOR_EACH_OBSERVER(Observer, observers_, OnCandidateCommitted(i)); | 401 FOR_EACH_OBSERVER(Observer, observers_, OnCandidateCommitted(i)); |
| 402 return; | 402 return; |
| 403 } | 403 } |
| 404 } | 404 } |
| 405 } | 405 } |
| 406 | 406 |
| 407 } // namespace ime | 407 } // namespace ime |
| 408 } // namespace ash | 408 } // namespace ash |
| OLD | NEW |