| 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 "chrome/browser/views/tabs/tab_strip.h" | 5 #include "chrome/browser/views/tabs/tab_strip.h" |
| 6 | 6 |
| 7 #include "app/animation_container.h" | 7 #include "app/animation_container.h" |
| 8 #include "app/drag_drop_types.h" | 8 #include "app/drag_drop_types.h" |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "app/os_exchange_data.h" | 10 #include "app/os_exchange_data.h" |
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 canvas->restore(); | 465 canvas->restore(); |
| 466 } else { | 466 } else { |
| 467 tab->ProcessPaint(canvas); | 467 tab->ProcessPaint(canvas); |
| 468 } | 468 } |
| 469 } else { | 469 } else { |
| 470 selected_tab = tab; | 470 selected_tab = tab; |
| 471 } | 471 } |
| 472 } | 472 } |
| 473 } | 473 } |
| 474 | 474 |
| 475 if (GetThemeProvider()->ShouldUseNativeFrame()) { | 475 if (GetWindow()->GetNonClientView()->UseNativeFrame()) { |
| 476 // Make sure unselected tabs are somewhat transparent. | 476 // Make sure unselected tabs are somewhat transparent. |
| 477 SkPaint paint; | 477 SkPaint paint; |
| 478 paint.setColor(SkColorSetARGB(200, 255, 255, 255)); | 478 paint.setColor(SkColorSetARGB(200, 255, 255, 255)); |
| 479 paint.setXfermodeMode(SkXfermode::kDstIn_Mode); | 479 paint.setXfermodeMode(SkXfermode::kDstIn_Mode); |
| 480 paint.setStyle(SkPaint::kFill_Style); | 480 paint.setStyle(SkPaint::kFill_Style); |
| 481 canvas->FillRectInt( | 481 canvas->FillRectInt( |
| 482 0, 0, width(), | 482 0, 0, width(), |
| 483 height() - 2, // Visible region that overlaps the toolbar. | 483 height() - 2, // Visible region that overlaps the toolbar. |
| 484 paint); | 484 paint); |
| 485 } | 485 } |
| (...skipping 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1758 return tab_data_.size(); | 1758 return tab_data_.size(); |
| 1759 } | 1759 } |
| 1760 | 1760 |
| 1761 int TabStrip::TabDataIndexOfTab(Tab* tab) const { | 1761 int TabStrip::TabDataIndexOfTab(Tab* tab) const { |
| 1762 for (size_t i = 0; i < tab_data_.size(); ++i) { | 1762 for (size_t i = 0; i < tab_data_.size(); ++i) { |
| 1763 if (tab_data_[i].tab == tab) | 1763 if (tab_data_[i].tab == tab) |
| 1764 return i; | 1764 return i; |
| 1765 } | 1765 } |
| 1766 return -1; | 1766 return -1; |
| 1767 } | 1767 } |
| OLD | NEW |