| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/browser/views/tabs/tab_strip.h" | 5 #include "chrome/browser/views/tabs/tab_strip.h" |
| 6 | 6 |
| 7 #include "app/drag_drop_types.h" | 7 #include "app/drag_drop_types.h" |
| 8 #include "app/gfx/canvas.h" | 8 #include "app/gfx/canvas.h" |
| 9 #include "app/gfx/path.h" | 9 #include "app/gfx/path.h" |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| (...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 tab->ProcessPaint(canvas); | 610 tab->ProcessPaint(canvas); |
| 611 } else { | 611 } else { |
| 612 selected_tab = tab; | 612 selected_tab = tab; |
| 613 } | 613 } |
| 614 } | 614 } |
| 615 | 615 |
| 616 if (GetThemeProvider()->ShouldUseNativeFrame()) { | 616 if (GetThemeProvider()->ShouldUseNativeFrame()) { |
| 617 // Make sure unselected tabs are somewhat transparent. | 617 // Make sure unselected tabs are somewhat transparent. |
| 618 SkPaint paint; | 618 SkPaint paint; |
| 619 paint.setColor(SkColorSetARGB(200, 255, 255, 255)); | 619 paint.setColor(SkColorSetARGB(200, 255, 255, 255)); |
| 620 paint.setPorterDuffXfermode(SkPorterDuff::kDstIn_Mode); | 620 paint.setXfermode(SkXfermode::kDstIn_Mode); |
| 621 paint.setStyle(SkPaint::kFill_Style); | 621 paint.setStyle(SkPaint::kFill_Style); |
| 622 canvas->FillRectInt( | 622 canvas->FillRectInt( |
| 623 0, 0, width(), | 623 0, 0, width(), |
| 624 height() - 2, // Visible region that overlaps the toolbar. | 624 height() - 2, // Visible region that overlaps the toolbar. |
| 625 paint); | 625 paint); |
| 626 } | 626 } |
| 627 | 627 |
| 628 // Paint the selected tab last, so it overlaps all the others. | 628 // Paint the selected tab last, so it overlaps all the others. |
| 629 if (selected_tab) | 629 if (selected_tab) |
| 630 selected_tab->ProcessPaint(canvas); | 630 selected_tab->ProcessPaint(canvas); |
| (...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1572 &TabStrip::ResizeLayoutTabs), | 1572 &TabStrip::ResizeLayoutTabs), |
| 1573 kResizeTabsTimeMs); | 1573 kResizeTabsTimeMs); |
| 1574 } | 1574 } |
| 1575 } else { | 1575 } else { |
| 1576 // Mouse moved quickly out of the tab strip and then into it again, so | 1576 // Mouse moved quickly out of the tab strip and then into it again, so |
| 1577 // cancel the timer so that the strip doesn't move when the mouse moves | 1577 // cancel the timer so that the strip doesn't move when the mouse moves |
| 1578 // back over it. | 1578 // back over it. |
| 1579 resize_layout_factory_.RevokeAll(); | 1579 resize_layout_factory_.RevokeAll(); |
| 1580 } | 1580 } |
| 1581 } | 1581 } |
| OLD | NEW |