| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "views/controls/table/table_view.h" | 5 #include "views/controls/table/table_view.h" |
| 6 | 6 |
| 7 #include <commctrl.h> | 7 #include <commctrl.h> |
| 8 #include <windowsx.h> | 8 #include <windowsx.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 1485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1496 if (!ignore_listview_change_ && table_view_observer_) | 1496 if (!ignore_listview_change_ && table_view_observer_) |
| 1497 table_view_observer_->OnMiddleClick(); | 1497 table_view_observer_->OnMiddleClick(); |
| 1498 } | 1498 } |
| 1499 | 1499 |
| 1500 void TableView::OnSelectedStateChanged() { | 1500 void TableView::OnSelectedStateChanged() { |
| 1501 if (!ignore_listview_change_ && table_view_observer_) { | 1501 if (!ignore_listview_change_ && table_view_observer_) { |
| 1502 table_view_observer_->OnSelectionChanged(); | 1502 table_view_observer_->OnSelectionChanged(); |
| 1503 } | 1503 } |
| 1504 } | 1504 } |
| 1505 | 1505 |
| 1506 bool TableView::OnKeyDown(app::KeyboardCode virtual_keycode) { | 1506 bool TableView::OnKeyDown(ui::KeyboardCode virtual_keycode) { |
| 1507 if (!ignore_listview_change_ && table_view_observer_) { | 1507 if (!ignore_listview_change_ && table_view_observer_) { |
| 1508 table_view_observer_->OnKeyDown(virtual_keycode); | 1508 table_view_observer_->OnKeyDown(virtual_keycode); |
| 1509 } | 1509 } |
| 1510 return false; // Let the key event be processed as ususal. | 1510 return false; // Let the key event be processed as ususal. |
| 1511 } | 1511 } |
| 1512 | 1512 |
| 1513 int TableView::PreviousSelectedViewIndex(int view_index) { | 1513 int TableView::PreviousSelectedViewIndex(int view_index) { |
| 1514 DCHECK_GE(view_index, 0); | 1514 DCHECK_GE(view_index, 0); |
| 1515 if (!list_view_ || view_index <= 0) | 1515 if (!list_view_ || view_index <= 0) |
| 1516 return -1; | 1516 return -1; |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1634 } | 1634 } |
| 1635 | 1635 |
| 1636 void TableSelectionIterator::UpdateModelIndexFromViewIndex() { | 1636 void TableSelectionIterator::UpdateModelIndexFromViewIndex() { |
| 1637 if (view_index_ == -1) | 1637 if (view_index_ == -1) |
| 1638 model_index_ = -1; | 1638 model_index_ = -1; |
| 1639 else | 1639 else |
| 1640 model_index_ = table_view_->ViewToModel(view_index_); | 1640 model_index_ = table_view_->ViewToModel(view_index_); |
| 1641 } | 1641 } |
| 1642 | 1642 |
| 1643 } // namespace views | 1643 } // namespace views |
| OLD | NEW |