| 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 | 4 |
| 5 #include "ui/views/controls/table/table_view.h" | 5 #include "ui/views/controls/table/table_view.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 | 441 |
| 442 std::vector<base::string16> name_parts; | 442 std::vector<base::string16> name_parts; |
| 443 for (const VisibleColumn& visible_column : visible_columns_) { | 443 for (const VisibleColumn& visible_column : visible_columns_) { |
| 444 base::string16 value = model_->GetText( | 444 base::string16 value = model_->GetText( |
| 445 selection_model_.active(), visible_column.column.id); | 445 selection_model_.active(), visible_column.column.id); |
| 446 if (!value.empty()) { | 446 if (!value.empty()) { |
| 447 name_parts.push_back(visible_column.column.title); | 447 name_parts.push_back(visible_column.column.title); |
| 448 name_parts.push_back(value); | 448 name_parts.push_back(value); |
| 449 } | 449 } |
| 450 } | 450 } |
| 451 state->name = base::JoinString(name_parts, base::ASCIIToUTF16(", ")); | 451 state->name = JoinString(name_parts, base::ASCIIToUTF16(", ")); |
| 452 } | 452 } |
| 453 } | 453 } |
| 454 | 454 |
| 455 void TableView::OnModelChanged() { | 455 void TableView::OnModelChanged() { |
| 456 selection_model_.Clear(); | 456 selection_model_.Clear(); |
| 457 NumRowsChanged(); | 457 NumRowsChanged(); |
| 458 } | 458 } |
| 459 | 459 |
| 460 void TableView::OnItemsChanged(int start, int length) { | 460 void TableView::OnItemsChanged(int start, int length) { |
| 461 SortItemsAndUpdateMapping(); | 461 SortItemsAndUpdateMapping(); |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 944 if (tooltip) | 944 if (tooltip) |
| 945 *tooltip = text; | 945 *tooltip = text; |
| 946 if (tooltip_origin) { | 946 if (tooltip_origin) { |
| 947 tooltip_origin->SetPoint(cell_bounds.x(), | 947 tooltip_origin->SetPoint(cell_bounds.x(), |
| 948 cell_bounds.y() + kTextVerticalPadding); | 948 cell_bounds.y() + kTextVerticalPadding); |
| 949 } | 949 } |
| 950 return true; | 950 return true; |
| 951 } | 951 } |
| 952 | 952 |
| 953 } // namespace views | 953 } // namespace views |
| OLD | NEW |