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

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: Remove extraneous changes 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 // Returns the inverse of the slope of the diagonal portion of the tab outer 165 // Returns the inverse of the slope of the diagonal portion of the tab outer
166 // border. (This is a positive value, so it's specifically for the slope of 166 // border. (This is a positive value, so it's specifically for the slope of
167 // the leading edge.) 167 // the leading edge.)
168 // 168 //
169 // This returns the inverse (dx/dy instead of dy/dx) because we use exact 169 // This returns the inverse (dx/dy instead of dy/dx) because we use exact
170 // values for the vertical distances between points and then compute the 170 // values for the vertical distances between points and then compute the
171 // horizontal deltas from those. 171 // horizontal deltas from those.
172 static float GetInverseDiagonalSlope(); 172 static float GetInverseDiagonalSlope();
173 173
174 // views::View:
175 void Layout() override;
176
174 private: 177 private:
175 friend class TabTest; 178 friend class TabTest;
176 friend class TabStripTest; 179 friend class TabStripTest;
177 FRIEND_TEST_ALL_PREFIXES(TabStripTest, TabHitTestMaskWhenStacked); 180 FRIEND_TEST_ALL_PREFIXES(TabStripTest, TabHitTestMaskWhenStacked);
178 FRIEND_TEST_ALL_PREFIXES(TabStripTest, TabCloseButtonVisibilityWhenStacked); 181 FRIEND_TEST_ALL_PREFIXES(TabStripTest, TabCloseButtonVisibilityWhenStacked);
179 182
180 // The animation object used to swap the favicon with the sad tab icon. 183 // The animation object used to swap the favicon with the sad tab icon.
181 class FaviconCrashAnimation; 184 class FaviconCrashAnimation;
182 185
183 class TabCloseButton; 186 class TabCloseButton;
(...skipping 29 matching lines...) Expand all
213 const gfx::Point& point, 216 const gfx::Point& point,
214 ui::MenuSourceType source_type) override; 217 ui::MenuSourceType source_type) override;
215 218
216 // views::MaskedTargeterDelegate: 219 // views::MaskedTargeterDelegate:
217 bool GetHitTestMask(gfx::Path* mask) const override; 220 bool GetHitTestMask(gfx::Path* mask) const override;
218 221
219 // views::View: 222 // views::View:
220 void ViewHierarchyChanged( 223 void ViewHierarchyChanged(
221 const ViewHierarchyChangedDetails& details) override; 224 const ViewHierarchyChangedDetails& details) override;
222 void OnPaint(gfx::Canvas* canvas) override; 225 void OnPaint(gfx::Canvas* canvas) override;
223 void Layout() override;
224 void OnThemeChanged() override; 226 void OnThemeChanged() override;
225 const char* GetClassName() const override; 227 const char* GetClassName() const override;
226 bool GetTooltipText(const gfx::Point& p, 228 bool GetTooltipText(const gfx::Point& p,
227 base::string16* tooltip) const override; 229 base::string16* tooltip) const override;
228 bool GetTooltipTextOrigin(const gfx::Point& p, 230 bool GetTooltipTextOrigin(const gfx::Point& p,
229 gfx::Point* origin) const override; 231 gfx::Point* origin) const override;
230 bool OnMousePressed(const ui::MouseEvent& event) override; 232 bool OnMousePressed(const ui::MouseEvent& event) override;
231 bool OnMouseDragged(const ui::MouseEvent& event) override; 233 bool OnMouseDragged(const ui::MouseEvent& event) override;
232 void OnMouseReleased(const ui::MouseEvent& event) override; 234 void OnMouseReleased(const ui::MouseEvent& event) override;
233 void OnMouseCaptureLost() override; 235 void OnMouseCaptureLost() override;
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 SkColor button_color_; 418 SkColor button_color_;
417 419
418 // As the majority of the tabs are inactive, and painting tabs is slowish, 420 // As the majority of the tabs are inactive, and painting tabs is slowish,
419 // we cache a handful of the inactive tab backgrounds here. 421 // we cache a handful of the inactive tab backgrounds here.
420 static ImageCache* image_cache_; 422 static ImageCache* image_cache_;
421 423
422 DISALLOW_COPY_AND_ASSIGN(Tab); 424 DISALLOW_COPY_AND_ASSIGN(Tab);
423 }; 425 };
424 426
425 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ 427 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab.cc » ('j') | chrome/browser/ui/views/tabs/tab_strip.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698