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/native_table_win.h" | 5 #include "views/controls/table/native_table_win.h" |
6 | 6 |
7 #include <commctrl.h> | 7 #include <commctrl.h> |
8 #include <windowsx.h> | 8 #include <windowsx.h> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 1, 1, kFaviconSize, kFaviconSize, true); | 541 1, 1, kFaviconSize, kFaviconSize, true); |
542 | 542 |
543 // Only paint the visible region of the icon. | 543 // Only paint the visible region of the icon. |
544 RECT to_draw = { intersection.left - icon_rect.left, | 544 RECT to_draw = { intersection.left - icon_rect.left, |
545 intersection.top - icon_rect.top, | 545 intersection.top - icon_rect.top, |
546 0, 0 }; | 546 0, 0 }; |
547 to_draw.right = to_draw.left + | 547 to_draw.right = to_draw.left + |
548 (intersection.right - intersection.left); | 548 (intersection.right - intersection.left); |
549 to_draw.bottom = to_draw.top + | 549 to_draw.bottom = to_draw.top + |
550 (intersection.bottom - intersection.top); | 550 (intersection.bottom - intersection.top); |
551 canvas.getTopPlatformDevice().drawToHDC(draw_info->nmcd.hdc, | 551 skia::platform_util::DrawToHDC(&canvas.getTopDevice(), |
552 intersection.left, | 552 draw_info->nmcd.hdc, |
553 intersection.top, | 553 intersection.left, |
554 &to_draw); | 554 intersection.top, &to_draw); |
555 r = CDRF_SKIPDEFAULT; | 555 r = CDRF_SKIPDEFAULT; |
556 } | 556 } |
557 } | 557 } |
558 } | 558 } |
559 } | 559 } |
560 return r; | 560 return r; |
561 } | 561 } |
562 default: | 562 default: |
563 return CDRF_DODEFAULT; | 563 return CDRF_DODEFAULT; |
564 } | 564 } |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
903 | 903 |
904 //////////////////////////////////////////////////////////////////////////////// | 904 //////////////////////////////////////////////////////////////////////////////// |
905 // NativeButtonWrapper, public: | 905 // NativeButtonWrapper, public: |
906 | 906 |
907 // static | 907 // static |
908 NativeTableWrapper* NativeTableWrapper::CreateNativeWrapper(TableView2* table) { | 908 NativeTableWrapper* NativeTableWrapper::CreateNativeWrapper(TableView2* table) { |
909 return new NativeTableWin(table); | 909 return new NativeTableWin(table); |
910 } | 910 } |
911 | 911 |
912 } // namespace views | 912 } // namespace views |
OLD | NEW |