| 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/infolist_window_view.h" | 4 #include "chrome/browser/chromeos/input_method/infolist_window_view.h" |
| 5 | 5 |
| 6 #include <limits> | 6 #include <limits> |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 description_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 94 description_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
| 95 description_label_->SetMultiLine(true); | 95 description_label_->SetMultiLine(true); |
| 96 description_label_->set_border( | 96 description_label_->set_border( |
| 97 views::Border::CreateEmptyBorder(2, 17, 4, 4)); | 97 views::Border::CreateEmptyBorder(2, 17, 4, 4)); |
| 98 AddChildView(title_label_); | 98 AddChildView(title_label_); |
| 99 AddChildView(description_label_); | 99 AddChildView(description_label_); |
| 100 UpdateLabelBackgroundColors(); | 100 UpdateLabelBackgroundColors(); |
| 101 } | 101 } |
| 102 | 102 |
| 103 void InfolistEntryView::Relayout(const InfolistWindowView::Entry& entry) { | 103 void InfolistEntryView::Relayout(const InfolistWindowView::Entry& entry) { |
| 104 const string16 title = UTF8ToUTF16(entry.title); | 104 const base::string16 title = UTF8ToUTF16(entry.title); |
| 105 const string16 description = UTF8ToUTF16(entry.body); | 105 const base::string16 description = UTF8ToUTF16(entry.body); |
| 106 | 106 |
| 107 if ((title_label_->text() == title) && | 107 if ((title_label_->text() == title) && |
| 108 (description_label_->text() == description)) { | 108 (description_label_->text() == description)) { |
| 109 return; | 109 return; |
| 110 } | 110 } |
| 111 | 111 |
| 112 title_label_->SetText(title); | 112 title_label_->SetText(title); |
| 113 const gfx::Size title_size = title_label_->GetPreferredSize(); | 113 const gfx::Size title_size = title_label_->GetPreferredSize(); |
| 114 title_label_->SetSize(title_size); | 114 title_label_->SetSize(title_size); |
| 115 | 115 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 infolist_area_->SchedulePaint(); | 225 infolist_area_->SchedulePaint(); |
| 226 } | 226 } |
| 227 | 227 |
| 228 // static | 228 // static |
| 229 const size_t InfolistWindowView::InvalidFocusIndex() { | 229 const size_t InfolistWindowView::InvalidFocusIndex() { |
| 230 return std::numeric_limits<size_t>::max(); | 230 return std::numeric_limits<size_t>::max(); |
| 231 } | 231 } |
| 232 | 232 |
| 233 } // namespace input_method | 233 } // namespace input_method |
| 234 } // namespace chromeos | 234 } // namespace chromeos |
| OLD | NEW |