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

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

Issue 11365201: Remove TabContents from TabStripModelObserver::TabMoved. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: linux oops 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 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after
1095 old_model.selected_indices().end(), 1095 old_model.selected_indices().end(),
1096 model_->selection_model().selected_indices().begin(), 1096 model_->selection_model().selected_indices().begin(),
1097 model_->selection_model().selected_indices().end(), 1097 model_->selection_model().selected_indices().end(),
1098 it2); 1098 it2);
1099 for (std::vector<int>::iterator it = no_longer_selected.begin(); 1099 for (std::vector<int>::iterator it = no_longer_selected.begin();
1100 it != no_longer_selected.end(); ++it) { 1100 it != no_longer_selected.end(); ++it) {
1101 GetTabAtAdjustForAnimation(*it)->StopMiniTabTitleAnimation(); 1101 GetTabAtAdjustForAnimation(*it)->StopMiniTabTitleAnimation();
1102 } 1102 }
1103 } 1103 }
1104 1104
1105 void TabStripGtk::TabMoved(TabContents* contents, 1105 void TabStripGtk::TabMoved(WebContents* contents,
1106 int from_index, 1106 int from_index,
1107 int to_index) { 1107 int to_index) {
1108 gfx::Rect start_bounds = GetIdealBounds(from_index); 1108 gfx::Rect start_bounds = GetIdealBounds(from_index);
1109 TabGtk* tab = GetTabAt(from_index); 1109 TabGtk* tab = GetTabAt(from_index);
1110 tab_data_.erase(tab_data_.begin() + from_index); 1110 tab_data_.erase(tab_data_.begin() + from_index);
1111 TabData data = {tab, gfx::Rect()}; 1111 TabData data = {tab, gfx::Rect()};
1112 tab->set_mini(model_->IsMiniTab(to_index)); 1112 tab->set_mini(model_->IsMiniTab(to_index));
1113 tab->SetBlocked(model_->IsTabBlocked(to_index)); 1113 tab->SetBlocked(model_->IsTabBlocked(to_index));
1114 tab_data_.insert(tab_data_.begin() + to_index, data); 1114 tab_data_.insert(tab_data_.begin() + to_index, data);
1115 GenerateIdealBounds(); 1115 GenerateIdealBounds();
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
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