| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/gtk/tabs/tab_strip_gtk.h" | 5 #include "chrome/browser/ui/gtk/tabs/tab_strip_gtk.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1040 | 1040 |
| 1041 void TabStripGtk::TabDetachedAt(WebContents* contents, int index) { | 1041 void TabStripGtk::TabDetachedAt(WebContents* contents, int index) { |
| 1042 GenerateIdealBounds(); | 1042 GenerateIdealBounds(); |
| 1043 StartRemoveTabAnimation(index, contents); | 1043 StartRemoveTabAnimation(index, contents); |
| 1044 // Have to do this _after_ calling StartRemoveTabAnimation, so that any | 1044 // Have to do this _after_ calling StartRemoveTabAnimation, so that any |
| 1045 // previous remove is completed fully and index is valid in sync with the | 1045 // previous remove is completed fully and index is valid in sync with the |
| 1046 // model index. | 1046 // model index. |
| 1047 GetTabAt(index)->set_closing(true); | 1047 GetTabAt(index)->set_closing(true); |
| 1048 } | 1048 } |
| 1049 | 1049 |
| 1050 void TabStripGtk::ActiveTabChanged(TabContents* old_contents, | 1050 void TabStripGtk::ActiveTabChanged(WebContents* old_contents, |
| 1051 TabContents* new_contents, | 1051 WebContents* new_contents, |
| 1052 int index, | 1052 int index, |
| 1053 bool user_gesture) { | 1053 bool user_gesture) { |
| 1054 TRACE_EVENT0("ui::gtk", "TabStripGtk::ActiveTabChanged"); | 1054 TRACE_EVENT0("ui::gtk", "TabStripGtk::ActiveTabChanged"); |
| 1055 ReStack(); | 1055 ReStack(); |
| 1056 } | 1056 } |
| 1057 | 1057 |
| 1058 void TabStripGtk::TabSelectionChanged(TabStripModel* tab_strip_model, | 1058 void TabStripGtk::TabSelectionChanged(TabStripModel* tab_strip_model, |
| 1059 const TabStripSelectionModel& old_model) { | 1059 const TabStripSelectionModel& old_model) { |
| 1060 // We have "tiny tabs" if the tabs are so tiny that the unselected ones are | 1060 // We have "tiny tabs" if the tabs are so tiny that the unselected ones are |
| 1061 // a different size to the selected ones. | 1061 // a different size to the selected ones. |
| (...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2266 | 2266 |
| 2267 void TabStripGtk::SetNewTabButtonBackground() { | 2267 void TabStripGtk::SetNewTabButtonBackground() { |
| 2268 SkColor color = theme_service_->GetColor( | 2268 SkColor color = theme_service_->GetColor( |
| 2269 ThemeService::COLOR_BUTTON_BACKGROUND); | 2269 ThemeService::COLOR_BUTTON_BACKGROUND); |
| 2270 SkBitmap background = theme_service_->GetImageNamed( | 2270 SkBitmap background = theme_service_->GetImageNamed( |
| 2271 IDR_THEME_WINDOW_CONTROL_BACKGROUND).AsBitmap(); | 2271 IDR_THEME_WINDOW_CONTROL_BACKGROUND).AsBitmap(); |
| 2272 SkBitmap mask = theme_service_->GetImageNamed( | 2272 SkBitmap mask = theme_service_->GetImageNamed( |
| 2273 IDR_NEWTAB_BUTTON_MASK).AsBitmap(); | 2273 IDR_NEWTAB_BUTTON_MASK).AsBitmap(); |
| 2274 newtab_button_->SetBackground(color, background, mask); | 2274 newtab_button_->SetBackground(color, background, mask); |
| 2275 } | 2275 } |
| OLD | NEW |