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::DrawToNativeContext(&canvas, draw_info->nmcd.hdc, |
552 intersection.left, | 552 intersection.left, intersection.top, |
553 intersection.top, | 553 &to_draw); |
554 &to_draw); | |
555 r = CDRF_SKIPDEFAULT; | 554 r = CDRF_SKIPDEFAULT; |
556 } | 555 } |
557 } | 556 } |
558 } | 557 } |
559 } | 558 } |
560 return r; | 559 return r; |
561 } | 560 } |
562 default: | 561 default: |
563 return CDRF_DODEFAULT; | 562 return CDRF_DODEFAULT; |
564 } | 563 } |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
903 | 902 |
904 //////////////////////////////////////////////////////////////////////////////// | 903 //////////////////////////////////////////////////////////////////////////////// |
905 // NativeButtonWrapper, public: | 904 // NativeButtonWrapper, public: |
906 | 905 |
907 // static | 906 // static |
908 NativeTableWrapper* NativeTableWrapper::CreateNativeWrapper(TableView2* table) { | 907 NativeTableWrapper* NativeTableWrapper::CreateNativeWrapper(TableView2* table) { |
909 return new NativeTableWin(table); | 908 return new NativeTableWin(table); |
910 } | 909 } |
911 | 910 |
912 } // namespace views | 911 } // namespace views |
OLD | NEW |