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

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

Issue 10453101: Convert most of the rest of chrome to ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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
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_TAB_ICON_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TAB_ICON_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_TAB_ICON_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TAB_ICON_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "ui/views/view.h" 10 #include "ui/views/view.h"
11 11
12 class SkBitmap;
13
12 namespace gfx { 14 namespace gfx {
13 class ImageSkia; 15 class ImageSkia;
14 } 16 }
15 17
16 //////////////////////////////////////////////////////////////////////////////// 18 ////////////////////////////////////////////////////////////////////////////////
17 // 19 //
18 // A view to display a tab favicon or a throbber. 20 // A view to display a tab favicon or a throbber.
19 // 21 //
20 //////////////////////////////////////////////////////////////////////////////// 22 ////////////////////////////////////////////////////////////////////////////////
21 class TabIconView : public views::View { 23 class TabIconView : public views::View {
(...skipping 20 matching lines...) Expand all
42 void set_is_light(bool is_light) { is_light_ = is_light; } 44 void set_is_light(bool is_light) { is_light_ = is_light; }
43 45
44 // Overridden from View 46 // Overridden from View
45 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 47 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
46 virtual gfx::Size GetPreferredSize() OVERRIDE; 48 virtual gfx::Size GetPreferredSize() OVERRIDE;
47 49
48 private: 50 private:
49 void PaintThrobber(gfx::Canvas* canvas); 51 void PaintThrobber(gfx::Canvas* canvas);
50 void PaintFavicon(gfx::Canvas* canvas, const SkBitmap& bitmap); 52 void PaintFavicon(gfx::Canvas* canvas, const SkBitmap& bitmap);
51 void PaintIcon(gfx::Canvas* canvas, 53 void PaintIcon(gfx::Canvas* canvas,
52 const SkBitmap& bitmap, 54 const gfx::ImageSkia& image,
53 int src_x, 55 int src_x,
54 int src_y, 56 int src_y,
55 int src_w, 57 int src_w,
56 int src_h, 58 int src_h,
57 bool filter); 59 bool filter);
58 60
59 // Our model. 61 // Our model.
60 TabIconViewModel* model_; 62 TabIconViewModel* model_;
61 63
62 // Whether the throbber is running. 64 // Whether the throbber is running.
63 bool throbber_running_; 65 bool throbber_running_;
64 66
65 // Whether we should display our light or dark style. 67 // Whether we should display our light or dark style.
66 bool is_light_; 68 bool is_light_;
67 69
68 // Current frame of the throbber being painted. This is only used if 70 // Current frame of the throbber being painted. This is only used if
69 // throbber_running_ is true. 71 // throbber_running_ is true.
70 int throbber_frame_; 72 int throbber_frame_;
71 73
72 DISALLOW_COPY_AND_ASSIGN(TabIconView); 74 DISALLOW_COPY_AND_ASSIGN(TabIconView);
73 }; 75 };
74 76
75 #endif // CHROME_BROWSER_UI_VIEWS_TAB_ICON_VIEW_H_ 77 #endif // CHROME_BROWSER_UI_VIEWS_TAB_ICON_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/speech_recognition_bubble_views.cc ('k') | chrome/browser/ui/views/tab_icon_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698