| 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 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1129 // We'll receive another notification of the change asynchronously. | 1129 // We'll receive another notification of the change asynchronously. |
| 1130 return; | 1130 return; |
| 1131 } | 1131 } |
| 1132 tab->UpdateData(contents, | 1132 tab->UpdateData(contents, |
| 1133 model_->IsAppTab(index), | 1133 model_->IsAppTab(index), |
| 1134 change_type == LOADING_ONLY); | 1134 change_type == LOADING_ONLY); |
| 1135 tab->UpdateFromModel(); | 1135 tab->UpdateFromModel(); |
| 1136 } | 1136 } |
| 1137 | 1137 |
| 1138 void TabStripGtk::TabReplacedAt(TabStripModel* tab_strip_model, | 1138 void TabStripGtk::TabReplacedAt(TabStripModel* tab_strip_model, |
| 1139 TabContents* old_contents, | 1139 WebContents* old_contents, |
| 1140 TabContents* new_contents, | 1140 WebContents* new_contents, |
| 1141 int index) { | 1141 int index) { |
| 1142 TabChangedAt(new_contents->web_contents(), index, ALL); | 1142 TabChangedAt(new_contents, index, ALL); |
| 1143 } | 1143 } |
| 1144 | 1144 |
| 1145 void TabStripGtk::TabMiniStateChanged(WebContents* contents, int index) { | 1145 void TabStripGtk::TabMiniStateChanged(WebContents* contents, int index) { |
| 1146 // Don't do anything if we've already picked up the change from TabMoved. | 1146 // Don't do anything if we've already picked up the change from TabMoved. |
| 1147 if (GetTabAt(index)->mini() == model_->IsMiniTab(index)) | 1147 if (GetTabAt(index)->mini() == model_->IsMiniTab(index)) |
| 1148 return; | 1148 return; |
| 1149 | 1149 |
| 1150 GetTabAt(index)->set_mini(model_->IsMiniTab(index)); | 1150 GetTabAt(index)->set_mini(model_->IsMiniTab(index)); |
| 1151 // Don't animate if the window isn't visible yet. The window won't be visible | 1151 // Don't animate if the window isn't visible yet. The window won't be visible |
| 1152 // when dragging a mini-tab to a new window. | 1152 // when dragging a mini-tab to a new window. |
| (...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2267 | 2267 |
| 2268 void TabStripGtk::SetNewTabButtonBackground() { | 2268 void TabStripGtk::SetNewTabButtonBackground() { |
| 2269 SkColor color = theme_service_->GetColor( | 2269 SkColor color = theme_service_->GetColor( |
| 2270 ThemeService::COLOR_BUTTON_BACKGROUND); | 2270 ThemeService::COLOR_BUTTON_BACKGROUND); |
| 2271 SkBitmap background = theme_service_->GetImageNamed( | 2271 SkBitmap background = theme_service_->GetImageNamed( |
| 2272 IDR_THEME_WINDOW_CONTROL_BACKGROUND).AsBitmap(); | 2272 IDR_THEME_WINDOW_CONTROL_BACKGROUND).AsBitmap(); |
| 2273 SkBitmap mask = theme_service_->GetImageNamed( | 2273 SkBitmap mask = theme_service_->GetImageNamed( |
| 2274 IDR_NEWTAB_BUTTON_MASK).AsBitmap(); | 2274 IDR_NEWTAB_BUTTON_MASK).AsBitmap(); |
| 2275 newtab_button_->SetBackground(color, background, mask); | 2275 newtab_button_->SetBackground(color, background, mask); |
| 2276 } | 2276 } |
| OLD | NEW |