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

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

Issue 155441: Nukes the 3 arg TabMoved variant in favor of the 4 arg variant.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 months 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/gtk/tabs/tab_strip_gtk.h ('k') | chrome/browser/tabs/tab_strip_model.h » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/gtk/tabs/tab_strip_gtk.h" 5 #include "chrome/browser/gtk/tabs/tab_strip_gtk.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "app/gfx/canvas_paint.h" 9 #include "app/gfx/canvas_paint.h"
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 if (!IsAnimating() && (!resize_layout_scheduled_ || tiny_tabs)) { 735 if (!IsAnimating() && (!resize_layout_scheduled_ || tiny_tabs)) {
736 Layout(); 736 Layout();
737 } else { 737 } else {
738 gtk_widget_queue_draw(tabstrip_.get()); 738 gtk_widget_queue_draw(tabstrip_.get());
739 } 739 }
740 } 740 }
741 } 741 }
742 742
743 void TabStripGtk::TabMoved(TabContents* contents, 743 void TabStripGtk::TabMoved(TabContents* contents,
744 int from_index, 744 int from_index,
745 int to_index) { 745 int to_index,
746 bool pinned_state_changed) {
746 TabGtk* tab = GetTabAt(from_index); 747 TabGtk* tab = GetTabAt(from_index);
747 tab_data_.erase(tab_data_.begin() + from_index); 748 tab_data_.erase(tab_data_.begin() + from_index);
748 TabData data = {tab, gfx::Rect()}; 749 TabData data = {tab, gfx::Rect()};
749 tab_data_.insert(tab_data_.begin() + to_index, data); 750 tab_data_.insert(tab_data_.begin() + to_index, data);
750 GenerateIdealBounds(); 751 GenerateIdealBounds();
751 StartMoveTabAnimation(from_index, to_index); 752 StartMoveTabAnimation(from_index, to_index);
752 } 753 }
753 754
754 void TabStripGtk::TabChangedAt(TabContents* contents, int index, 755 void TabStripGtk::TabChangedAt(TabContents* contents, int index,
755 bool loading_only) { 756 bool loading_only) {
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after
1620 message.set_type(TabOverviewTypes::Message::WM_SWITCH_TO_OVERVIEW_MODE); 1621 message.set_type(TabOverviewTypes::Message::WM_SWITCH_TO_OVERVIEW_MODE);
1621 GtkWidget* browser_widget = GTK_WIDGET( 1622 GtkWidget* browser_widget = GTK_WIDGET(
1622 static_cast<BrowserWindowGtk*>(browser->window())->GetNativeHandle()); 1623 static_cast<BrowserWindowGtk*>(browser->window())->GetNativeHandle());
1623 message.set_param(0, x11_util::GetX11WindowFromGtkWidget(browser_widget)); 1624 message.set_param(0, x11_util::GetX11WindowFromGtkWidget(browser_widget));
1624 TabOverviewTypes::instance()->SendMessage(message); 1625 TabOverviewTypes::instance()->SendMessage(message);
1625 1626
1626 UserMetrics::RecordAction(L"TabOverview_PressedTabOverviewButton", 1627 UserMetrics::RecordAction(L"TabOverview_PressedTabOverviewButton",
1627 tabstrip->model_->profile()); 1628 tabstrip->model_->profile());
1628 } 1629 }
1629 #endif 1630 #endif
OLDNEW
« no previous file with comments | « chrome/browser/gtk/tabs/tab_strip_gtk.h ('k') | chrome/browser/tabs/tab_strip_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698