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 "base/macros.h" | 5 #include "base/macros.h" |
6 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
7 #include "ui/base/ime/candidate_window.h" | 7 #include "ui/base/ime/candidate_window.h" |
8 #include "ui/chromeos/ime/candidate_view.h" | 8 #include "ui/chromeos/ime/candidate_view.h" |
9 #include "ui/chromeos/ime/candidate_window_constants.h" | 9 #include "ui/chromeos/ime/candidate_window_constants.h" |
10 #include "ui/gfx/color_utils.h" | 10 #include "ui/gfx/color_utils.h" |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 if (view != this) | 218 if (view != this) |
219 view->SetHighlighted(false); | 219 view->SetHighlighted(false); |
220 } | 220 } |
221 } else { | 221 } else { |
222 set_background(NULL); | 222 set_background(NULL); |
223 SetBorder(views::CreateEmptyBorder(1, 1, 1, 1)); | 223 SetBorder(views::CreateEmptyBorder(1, 1, 1, 1)); |
224 } | 224 } |
225 SchedulePaint(); | 225 SchedulePaint(); |
226 } | 226 } |
227 | 227 |
228 void CandidateView::StateChanged() { | 228 void CandidateView::StateChanged(ButtonState old_state) { |
229 shortcut_label_->SetEnabled(state() != STATE_DISABLED); | 229 shortcut_label_->SetEnabled(state() != STATE_DISABLED); |
230 if (state() == STATE_PRESSED) | 230 if (state() == STATE_PRESSED) |
231 SetHighlighted(true); | 231 SetHighlighted(true); |
232 } | 232 } |
233 | 233 |
234 const char* CandidateView::GetClassName() const { | 234 const char* CandidateView::GetClassName() const { |
235 return "CandidateView"; | 235 return "CandidateView"; |
236 } | 236 } |
237 | 237 |
238 bool CandidateView::OnMouseDragged(const ui::MouseEvent& event) { | 238 bool CandidateView::OnMouseDragged(const ui::MouseEvent& event) { |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 } | 302 } |
303 | 303 |
304 // Reserves the margin for infolist_icon even if it's not visible. | 304 // Reserves the margin for infolist_icon even if it's not visible. |
305 size.Enlarge( | 305 size.Enlarge( |
306 kInfolistIndicatorIconWidth + kInfolistIndicatorIconPadding * 2, 0); | 306 kInfolistIndicatorIconWidth + kInfolistIndicatorIconPadding * 2, 0); |
307 return size; | 307 return size; |
308 } | 308 } |
309 | 309 |
310 } // namespace ime | 310 } // namespace ime |
311 } // namespace ui | 311 } // namespace ui |
OLD | NEW |