| 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 1470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1481 if (!ignore_listview_change_ && table_view_observer_) | 1481 if (!ignore_listview_change_ && table_view_observer_) |
| 1482 table_view_observer_->OnMiddleClick(); | 1482 table_view_observer_->OnMiddleClick(); |
| 1483 } | 1483 } |
| 1484 | 1484 |
| 1485 void TableView::OnSelectedStateChanged() { | 1485 void TableView::OnSelectedStateChanged() { |
| 1486 if (!ignore_listview_change_ && table_view_observer_) { | 1486 if (!ignore_listview_change_ && table_view_observer_) { |
| 1487 table_view_observer_->OnSelectionChanged(); | 1487 table_view_observer_->OnSelectionChanged(); |
| 1488 } | 1488 } |
| 1489 } | 1489 } |
| 1490 | 1490 |
| 1491 bool TableView::OnKeyDown(base::KeyboardCode virtual_keycode) { | 1491 bool TableView::OnKeyDown(app::KeyboardCode virtual_keycode) { |
| 1492 if (!ignore_listview_change_ && table_view_observer_) { | 1492 if (!ignore_listview_change_ && table_view_observer_) { |
| 1493 table_view_observer_->OnKeyDown(virtual_keycode); | 1493 table_view_observer_->OnKeyDown(virtual_keycode); |
| 1494 } | 1494 } |
| 1495 return false; // Let the key event be processed as ususal. | 1495 return false; // Let the key event be processed as ususal. |
| 1496 } | 1496 } |
| 1497 | 1497 |
| 1498 int TableView::PreviousSelectedViewIndex(int view_index) { | 1498 int TableView::PreviousSelectedViewIndex(int view_index) { |
| 1499 DCHECK_GE(view_index, 0); | 1499 DCHECK_GE(view_index, 0); |
| 1500 if (!list_view_ || view_index <= 0) | 1500 if (!list_view_ || view_index <= 0) |
| 1501 return -1; | 1501 return -1; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1597 } | 1597 } |
| 1598 | 1598 |
| 1599 void TableSelectionIterator::UpdateModelIndexFromViewIndex() { | 1599 void TableSelectionIterator::UpdateModelIndexFromViewIndex() { |
| 1600 if (view_index_ == -1) | 1600 if (view_index_ == -1) |
| 1601 model_index_ = -1; | 1601 model_index_ = -1; |
| 1602 else | 1602 else |
| 1603 model_index_ = table_view_->ViewToModel(view_index_); | 1603 model_index_ = table_view_->ViewToModel(view_index_); |
| 1604 } | 1604 } |
| 1605 | 1605 |
| 1606 } // namespace views | 1606 } // namespace views |
| OLD | NEW |