Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(438)

Side by Side Diff: chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc

Issue 11359201: Remove TabContents from TabStripModelObserver::TabReplacedAt. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/gtk/tabs/tab_strip_gtk.h ('k') | chrome/browser/ui/tabs/tab_strip_model.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/tabs/tab_strip_gtk.h ('k') | chrome/browser/ui/tabs/tab_strip_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698