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

Unified Diff: chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc

Issue 8771014: GTK: Cleanup of TabStripGtk::ResizeLayoutTabs() now that the layout is fixed. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/gtk/tabs/tab_strip_gtk.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
diff --git a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
index 1edc5adf3355f7ca03695bfec8d4a9ff77322cc2..cfc335664529e18bb64947d9aae30d4ecae03b0f 100644
--- a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
+++ b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
@@ -1395,7 +1395,7 @@ void TabStripGtk::HandleGlobalMouseMoveEvent() {
if (!weak_factory_.HasWeakPtrs()) {
MessageLoop::current()->PostDelayedTask(
FROM_HERE,
- base::Bind(&TabStripGtk::ResizeLayoutTabsWithoutResult,
+ base::Bind(&TabStripGtk::ResizeLayoutTabs,
weak_factory_.GetWeakPtr()),
kResizeTabsTimeMs);
}
@@ -1560,7 +1560,7 @@ int TabStripGtk::tab_start_x() const {
return 0;
}
-bool TabStripGtk::ResizeLayoutTabs() {
+void TabStripGtk::ResizeLayoutTabs() {
weak_factory_.InvalidateWeakPtrs();
layout_factory_.InvalidateWeakPtrs();
@@ -1573,7 +1573,7 @@ bool TabStripGtk::ResizeLayoutTabs() {
if (mini_tab_count == GetTabCount()) {
// Only mini tabs, we know the tab widths won't have changed (all mini-tabs
// have the same width), so there is nothing to do.
- return false;
+ return;
}
TabGtk* first_tab = GetTabAt(mini_tab_count);
double unselected, selected;
@@ -1582,16 +1582,8 @@ bool TabStripGtk::ResizeLayoutTabs() {
// We only want to run the animation if we're not already at the desired
// size.
- if (abs(first_tab->width() - w) > 1) {
+ if (abs(first_tab->width() - w) > 1)
StartResizeLayoutAnimation();
- return true;
- }
-
- return false;
-}
-
-void TabStripGtk::ResizeLayoutTabsWithoutResult() {
- ResizeLayoutTabs();
}
bool TabStripGtk::IsCursorInTabStripZone() const {
« no previous file with comments | « chrome/browser/ui/gtk/tabs/tab_strip_gtk.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698