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

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

Issue 1354823002: Render the tab close button as a vector-based icon. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 5 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab.cc » ('j') | chrome/browser/ui/views/tabs/tab.cc » ('J')
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 #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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 189
190 // views::ContextMenuController: 190 // views::ContextMenuController:
191 void ShowContextMenuForView(views::View* source, 191 void ShowContextMenuForView(views::View* source,
192 const gfx::Point& point, 192 const gfx::Point& point,
193 ui::MenuSourceType source_type) override; 193 ui::MenuSourceType source_type) override;
194 194
195 // views::MaskedTargeterDelegate: 195 // views::MaskedTargeterDelegate:
196 bool GetHitTestMask(gfx::Path* mask) const override; 196 bool GetHitTestMask(gfx::Path* mask) const override;
197 197
198 // views::View: 198 // views::View:
199 void ViewHierarchyChanged(
200 const ViewHierarchyChangedDetails& details) override;
199 void OnPaint(gfx::Canvas* canvas) override; 201 void OnPaint(gfx::Canvas* canvas) override;
200 void Layout() override; 202 void Layout() override;
201 void OnThemeChanged() override; 203 void OnThemeChanged() override;
202 const char* GetClassName() const override; 204 const char* GetClassName() const override;
203 bool GetTooltipText(const gfx::Point& p, 205 bool GetTooltipText(const gfx::Point& p,
204 base::string16* tooltip) const override; 206 base::string16* tooltip) const override;
205 bool GetTooltipTextOrigin(const gfx::Point& p, 207 bool GetTooltipTextOrigin(const gfx::Point& p,
206 gfx::Point* origin) const override; 208 gfx::Point* origin) const override;
207 bool OnMousePressed(const ui::MouseEvent& event) override; 209 bool OnMousePressed(const ui::MouseEvent& event) override;
208 bool OnMouseDragged(const ui::MouseEvent& event) override; 210 bool OnMouseDragged(const ui::MouseEvent& event) override;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 274
273 void DisplayCrashedFavicon(); 275 void DisplayCrashedFavicon();
274 void ResetCrashedFavicon(); 276 void ResetCrashedFavicon();
275 277
276 void StopCrashAnimation(); 278 void StopCrashAnimation();
277 void StartCrashAnimation(); 279 void StartCrashAnimation();
278 280
279 // Returns true if the crash animation is currently running. 281 // Returns true if the crash animation is currently running.
280 bool IsPerformingCrashAnimation() const; 282 bool IsPerformingCrashAnimation() const;
281 283
284 // Calculates the correct |close_button_color_| and sets the close button
285 // normal-state image. This should be called any time the theme or active
286 // state may have changed.
287 void SetCloseButtonNormalStateImage();
288
282 // Schedules repaint task for icon. 289 // Schedules repaint task for icon.
283 void ScheduleIconPaint(); 290 void ScheduleIconPaint();
284 291
285 // Returns a |path| containing the region that matches the bitmap display of 292 // Returns a |path| containing the region that matches the bitmap display of
286 // this tab, for input event hit testing. Set |include_top_shadow| to include 293 // this tab, for input event hit testing. Set |include_top_shadow| to include
287 // the mostly-transparent shadow pixels above the top edge of the tab in the 294 // the mostly-transparent shadow pixels above the top edge of the tab in the
288 // path. 295 // path.
289 void GetHitTestMaskHelper(bool include_top_shadow, gfx::Path* path) const; 296 void GetHitTestMaskHelper(bool include_top_shadow, gfx::Path* path) const;
290 297
291 // Returns the rectangle for the light bar in immersive mode. 298 // Returns the rectangle for the light bar in immersive mode.
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 SkColor close_button_color_; 406 SkColor close_button_color_;
400 407
401 // As the majority of the tabs are inactive, and painting tabs is slowish, 408 // As the majority of the tabs are inactive, and painting tabs is slowish,
402 // we cache a handful of the inactive tab backgrounds here. 409 // we cache a handful of the inactive tab backgrounds here.
403 static ImageCache* image_cache_; 410 static ImageCache* image_cache_;
404 411
405 DISALLOW_COPY_AND_ASSIGN(Tab); 412 DISALLOW_COPY_AND_ASSIGN(Tab);
406 }; 413 };
407 414
408 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ 415 #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.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698