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

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

Issue 10447053: Converts remainder of ui and chrome/browser/ui/views/frame to use 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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; 12 namespace gfx {
13 class ImageSkia;
14 }
13 15
14 //////////////////////////////////////////////////////////////////////////////// 16 ////////////////////////////////////////////////////////////////////////////////
15 // 17 //
16 // A view to display a tab favicon or a throbber. 18 // A view to display a tab favicon or a throbber.
17 // 19 //
18 //////////////////////////////////////////////////////////////////////////////// 20 ////////////////////////////////////////////////////////////////////////////////
19 class TabIconView : public views::View { 21 class TabIconView : public views::View {
20 public: 22 public:
21 // Classes implement this interface to provide state for the TabIconView. 23 // Classes implement this interface to provide state for the TabIconView.
22 class TabIconViewModel { 24 class TabIconViewModel {
23 public: 25 public:
24 // Returns true if the TabIconView should show a loading animation. 26 // Returns true if the TabIconView should show a loading animation.
25 virtual bool ShouldTabIconViewAnimate() const = 0; 27 virtual bool ShouldTabIconViewAnimate() const = 0;
26 28
27 // Returns the favicon to display in the icon view 29 // Returns the favicon to display in the icon view
28 virtual SkBitmap GetFaviconForTabIconView() = 0; 30 virtual gfx::ImageSkia GetFaviconForTabIconView() = 0;
29 }; 31 };
30 32
31 static void InitializeIfNeeded(); 33 static void InitializeIfNeeded();
32 34
33 explicit TabIconView(TabIconViewModel* provider); 35 explicit TabIconView(TabIconViewModel* provider);
34 virtual ~TabIconView(); 36 virtual ~TabIconView();
35 37
36 // Invoke whenever the tab state changes or the throbber should update. 38 // Invoke whenever the tab state changes or the throbber should update.
37 void Update(); 39 void Update();
38 40
(...skipping 25 matching lines...) Expand all
64 bool is_light_; 66 bool is_light_;
65 67
66 // Current frame of the throbber being painted. This is only used if 68 // Current frame of the throbber being painted. This is only used if
67 // throbber_running_ is true. 69 // throbber_running_ is true.
68 int throbber_frame_; 70 int throbber_frame_;
69 71
70 DISALLOW_COPY_AND_ASSIGN(TabIconView); 72 DISALLOW_COPY_AND_ASSIGN(TabIconView);
71 }; 73 };
72 74
73 #endif // CHROME_BROWSER_UI_VIEWS_TAB_ICON_VIEW_H_ 75 #endif // CHROME_BROWSER_UI_VIEWS_TAB_ICON_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/opaque_browser_frame_view.cc ('k') | content/browser/web_contents/web_contents_drag_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698