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

Side by Side Diff: chrome/browser/views/tab_icon_view.h

Issue 113443: ChromeCanvas->gfx::Canvas (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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/views/status_bubble_views.cc ('k') | chrome/browser/views/tab_icon_view.cc » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_VIEW_TAB_ICON_VIEW_H_ 5 #ifndef CHROME_BROWSER_VIEW_TAB_ICON_VIEW_H_
6 #define CHROME_BROWSER_VIEW_TAB_ICON_VIEW_H_ 6 #define CHROME_BROWSER_VIEW_TAB_ICON_VIEW_H_
7 7
8 #include "views/view.h" 8 #include "views/view.h"
9 9
10 class SkBitmap; 10 class SkBitmap;
(...skipping 21 matching lines...) Expand all
32 explicit TabIconView(TabIconViewModel* provider); 32 explicit TabIconView(TabIconViewModel* provider);
33 virtual ~TabIconView(); 33 virtual ~TabIconView();
34 34
35 // Invoke whenever the tab state changes or the throbber should update. 35 // Invoke whenever the tab state changes or the throbber should update.
36 void Update(); 36 void Update();
37 37
38 // Set the throbber to the light style (for use on dark backgrounds). 38 // Set the throbber to the light style (for use on dark backgrounds).
39 void set_is_light(bool is_light) { is_light_ = is_light; } 39 void set_is_light(bool is_light) { is_light_ = is_light; }
40 40
41 // Overriden from View 41 // Overriden from View
42 virtual void Paint(ChromeCanvas* canvas); 42 virtual void Paint(gfx::Canvas* canvas);
43 virtual gfx::Size GetPreferredSize(); 43 virtual gfx::Size GetPreferredSize();
44 44
45 private: 45 private:
46 void PaintThrobber(ChromeCanvas* canvas); 46 void PaintThrobber(gfx::Canvas* canvas);
47 void PaintFavIcon(ChromeCanvas* canvas, const SkBitmap& bitmap); 47 void PaintFavIcon(gfx::Canvas* canvas, const SkBitmap& bitmap);
48 void PaintIcon(ChromeCanvas* canvas, 48 void PaintIcon(gfx::Canvas* canvas,
49 const SkBitmap& bitmap, 49 const SkBitmap& bitmap,
50 int src_x, 50 int src_x,
51 int src_y, 51 int src_y,
52 int src_w, 52 int src_w,
53 int src_h, 53 int src_h,
54 bool filter); 54 bool filter);
55 55
56 // Our model. 56 // Our model.
57 TabIconViewModel* model_; 57 TabIconViewModel* model_;
58 58
59 // Whether the throbber is running. 59 // Whether the throbber is running.
60 bool throbber_running_; 60 bool throbber_running_;
61 61
62 // Whether we should display our light or dark style. 62 // Whether we should display our light or dark style.
63 bool is_light_; 63 bool is_light_;
64 64
65 // Current frame of the throbber being painted. This is only used if 65 // Current frame of the throbber being painted. This is only used if
66 // throbber_running_ is true. 66 // throbber_running_ is true.
67 int throbber_frame_; 67 int throbber_frame_;
68 68
69 DISALLOW_COPY_AND_ASSIGN(TabIconView); 69 DISALLOW_COPY_AND_ASSIGN(TabIconView);
70 }; 70 };
71 71
72 #endif // CHROME_BROWSER_VIEW_TAB_ICON_VIEW_H_ 72 #endif // CHROME_BROWSER_VIEW_TAB_ICON_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/views/status_bubble_views.cc ('k') | chrome/browser/views/tab_icon_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698