| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ui/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> |
| 11 | 11 |
| 12 #include "base/i18n/rtl.h" | 12 #include "base/i18n/rtl.h" |
| 13 #include "base/string_util.h" | 13 #include "base/string_util.h" |
| 14 #include "base/win/scoped_gdi_object.h" | 14 #include "base/win/scoped_gdi_object.h" |
| 15 #include "skia/ext/skia_utils_win.h" | 15 #include "skia/ext/skia_utils_win.h" |
| 16 #include "third_party/skia/include/core/SkBitmap.h" | 16 #include "third_party/skia/include/core/SkBitmap.h" |
| 17 #include "third_party/skia/include/core/SkColorFilter.h" | 17 #include "third_party/skia/include/core/SkColorFilter.h" |
| 18 #include "ui/base/l10n/l10n_util.h" | 18 #include "ui/base/l10n/l10n_util.h" |
| 19 #include "ui/base/l10n/l10n_util_win.h" | 19 #include "ui/base/l10n/l10n_util_win.h" |
| 20 #include "ui/base/models/table_model.h" | 20 #include "ui/base/models/table_model.h" |
| 21 #include "ui/base/resource/resource_bundle.h" | 21 #include "ui/base/resource/resource_bundle.h" |
| 22 #include "ui/base/win/hwnd_util.h" | 22 #include "ui/base/win/hwnd_util.h" |
| 23 #include "ui/gfx/canvas_skia.h" | 23 #include "ui/gfx/canvas_skia.h" |
| 24 #include "ui/gfx/favicon_size.h" | 24 #include "ui/gfx/favicon_size.h" |
| 25 #include "ui/gfx/font.h" | 25 #include "ui/gfx/font.h" |
| 26 #include "ui/gfx/icon_util.h" | 26 #include "ui/gfx/icon_util.h" |
| 27 #include "ui/views/controls/table/table_view_observer.h" |
| 27 #include "views/controls/native/native_view_host.h" | 28 #include "views/controls/native/native_view_host.h" |
| 28 #include "views/controls/table/table_view_observer.h" | |
| 29 | 29 |
| 30 namespace { | 30 namespace { |
| 31 | 31 |
| 32 int GetViewIndexFromPoint(HWND window, const gfx::Point& p) { | 32 int GetViewIndexFromPoint(HWND window, const gfx::Point& p) { |
| 33 LVHITTESTINFO hit_info = {0}; | 33 LVHITTESTINFO hit_info = {0}; |
| 34 hit_info.pt.x = p.x(); | 34 hit_info.pt.x = p.x(); |
| 35 hit_info.pt.y = p.y(); | 35 hit_info.pt.y = p.y(); |
| 36 return ListView_HitTest(window, &hit_info); | 36 return ListView_HitTest(window, &hit_info); |
| 37 } | 37 } |
| 38 | 38 |
| (...skipping 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1636 } | 1636 } |
| 1637 | 1637 |
| 1638 void TableSelectionIterator::UpdateModelIndexFromViewIndex() { | 1638 void TableSelectionIterator::UpdateModelIndexFromViewIndex() { |
| 1639 if (view_index_ == -1) | 1639 if (view_index_ == -1) |
| 1640 model_index_ = -1; | 1640 model_index_ = -1; |
| 1641 else | 1641 else |
| 1642 model_index_ = table_view_->ViewToModel(view_index_); | 1642 model_index_ = table_view_->ViewToModel(view_index_); |
| 1643 } | 1643 } |
| 1644 | 1644 |
| 1645 } // namespace views | 1645 } // namespace views |
| OLD | NEW |