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

Side by Side Diff: chrome/browser/ui/views/tabs/tab.h

Issue 1566313002: Remove layout during paint in Tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: With sky's changes to fake controller Created 4 years, 11 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
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 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_
6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 10
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 } 119 }
120 120
121 views::GlowHoverController* hover_controller() { 121 views::GlowHoverController* hover_controller() {
122 return &hover_controller_; 122 return &hover_controller_;
123 } 123 }
124 124
125 // Returns the width of the largest part of the tab that is available for the 125 // Returns the width of the largest part of the tab that is available for the
126 // user to click to select/activate the tab. 126 // user to click to select/activate the tab.
127 int GetWidthOfLargestSelectableRegion() const; 127 int GetWidthOfLargestSelectableRegion() const;
128 128
129 // Called when stacked layout changes and the close button may need to
130 // be updated.
131 void HideCloseButtonForInactiveTabsChanged() { Layout(); }
132
129 // Returns the inset within the first dragged tab to use when calculating the 133 // Returns the inset within the first dragged tab to use when calculating the
130 // "drag insertion point". If we simply used the x-coordinate of the tab, 134 // "drag insertion point". If we simply used the x-coordinate of the tab,
131 // we'd be calculating based on a point well before where the user considers 135 // we'd be calculating based on a point well before where the user considers
132 // the tab to "be". The value here is chosen to "feel good" based on the 136 // the tab to "be". The value here is chosen to "feel good" based on the
133 // widths of the tab images and the tab overlap. 137 // widths of the tab images and the tab overlap.
134 // 138 //
135 // Note that this must return a value smaller than the midpoint of any tab's 139 // Note that this must return a value smaller than the midpoint of any tab's
136 // width, or else the user won't be able to drag a tab to the left of the 140 // width, or else the user won't be able to drag a tab to the left of the
137 // first tab in the strip. 141 // first tab in the strip.
138 static int leading_width_for_drag() { return 16; } 142 static int leading_width_for_drag() { return 16; }
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 SkColor button_color_; 420 SkColor button_color_;
417 421
418 // As the majority of the tabs are inactive, and painting tabs is slowish, 422 // As the majority of the tabs are inactive, and painting tabs is slowish,
419 // we cache a handful of the inactive tab backgrounds here. 423 // we cache a handful of the inactive tab backgrounds here.
420 static ImageCache* image_cache_; 424 static ImageCache* image_cache_;
421 425
422 DISALLOW_COPY_AND_ASSIGN(Tab); 426 DISALLOW_COPY_AND_ASSIGN(Tab);
423 }; 427 };
424 428
425 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ 429 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.cc ('k') | chrome/browser/ui/views/tabs/tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698