| 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 "base/gfx/size.h" |     7 #include "base/gfx/size.h" | 
|     8 #include "chrome/browser/metrics/user_metrics.h" |     8 #include "chrome/browser/metrics/user_metrics.h" | 
|     9 #include "chrome/browser/profile.h" |     9 #include "chrome/browser/profile.h" | 
|    10 #include "chrome/browser/tab_contents/tab_contents.h" |    10 #include "chrome/browser/tab_contents/tab_contents.h" | 
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   594     // We must ask the _Tab's_ model, not ourselves, because in some situations |   594     // We must ask the _Tab's_ model, not ourselves, because in some situations | 
|   595     // the model will be different to this object, e.g. when a Tab is being |   595     // the model will be different to this object, e.g. when a Tab is being | 
|   596     // removed after its TabContents has been destroyed. |   596     // removed after its TabContents has been destroyed. | 
|   597     if (!tab->IsSelected()) { |   597     if (!tab->IsSelected()) { | 
|   598       tab->ProcessPaint(canvas); |   598       tab->ProcessPaint(canvas); | 
|   599     } else { |   599     } else { | 
|   600       selected_tab = tab; |   600       selected_tab = tab; | 
|   601     } |   601     } | 
|   602   } |   602   } | 
|   603  |   603  | 
|   604   if (GetWidget()->AsWindow()->GetNonClientView()->UseNativeFrame()) { |   604   if (GetWidget()->GetWindow()->GetNonClientView()->UseNativeFrame()) { | 
|   605     // Make sure unselected tabs are somewhat transparent. |   605     // Make sure unselected tabs are somewhat transparent. | 
|   606     SkPaint paint; |   606     SkPaint paint; | 
|   607     paint.setColor(SkColorSetARGB(200, 255, 255, 255)); |   607     paint.setColor(SkColorSetARGB(200, 255, 255, 255)); | 
|   608     paint.setPorterDuffXfermode(SkPorterDuff::kDstIn_Mode); |   608     paint.setPorterDuffXfermode(SkPorterDuff::kDstIn_Mode); | 
|   609     paint.setStyle(SkPaint::kFill_Style); |   609     paint.setStyle(SkPaint::kFill_Style); | 
|   610     canvas->FillRectInt( |   610     canvas->FillRectInt( | 
|   611         0, 0, width(), |   611         0, 0, width(), | 
|   612         height() - 2,  // Visible region that overlaps the toolbar. |   612         height() - 2,  // Visible region that overlaps the toolbar. | 
|   613         paint); |   613         paint); | 
|   614   } |   614   } | 
| (...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1519   // If the TabContents being detached was removed as a result of a drag |  1519   // If the TabContents being detached was removed as a result of a drag | 
|  1520   // gesture from its corresponding Tab, we don't want to remove the Tab from |  1520   // gesture from its corresponding Tab, we don't want to remove the Tab from | 
|  1521   // the child list, because if we do so it'll stop receiving events and the |  1521   // the child list, because if we do so it'll stop receiving events and the | 
|  1522   // drag will stall. So we only remove if a drag isn't active, or the Tab |  1522   // drag will stall. So we only remove if a drag isn't active, or the Tab | 
|  1523   // was for some other TabContents. |  1523   // was for some other TabContents. | 
|  1524   if (!IsDragSessionActive() || !drag_controller_->IsDragSourceTab(removed)) { |  1524   if (!IsDragSessionActive() || !drag_controller_->IsDragSourceTab(removed)) { | 
|  1525     removed->GetParent()->RemoveChildView(removed); |  1525     removed->GetParent()->RemoveChildView(removed); | 
|  1526     delete removed; |  1526     delete removed; | 
|  1527   } |  1527   } | 
|  1528 } |  1528 } | 
| OLD | NEW |