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

Unified Diff: chrome/browser/ui/views/tab_icon_view.h

Issue 10736063: views: Extract TabIconViewModel into its own header file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/tab_icon_view.h
diff --git a/chrome/browser/ui/views/tab_icon_view.h b/chrome/browser/ui/views/tab_icon_view.h
index f0108a806c7ae0087ba475bf9f7c49e1750b730a..79188ea52f403bdaaa699a9edd4fa7b6972e3efe 100644
--- a/chrome/browser/ui/views/tab_icon_view.h
+++ b/chrome/browser/ui/views/tab_icon_view.h
@@ -5,35 +5,26 @@
#ifndef CHROME_BROWSER_UI_VIEWS_TAB_ICON_VIEW_H_
#define CHROME_BROWSER_UI_VIEWS_TAB_ICON_VIEW_H_
+#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "ui/views/view.h"
class SkBitmap;
+namespace chrome {
+class TabIconViewModel;
+}
+
namespace gfx {
class ImageSkia;
}
-////////////////////////////////////////////////////////////////////////////////
-//
// A view to display a tab favicon or a throbber.
-//
-////////////////////////////////////////////////////////////////////////////////
class TabIconView : public views::View {
public:
- // Classes implement this interface to provide state for the TabIconView.
- class TabIconViewModel {
- public:
- // Returns true if the TabIconView should show a loading animation.
- virtual bool ShouldTabIconViewAnimate() const = 0;
-
- // Returns the favicon to display in the icon view
- virtual gfx::ImageSkia GetFaviconForTabIconView() = 0;
- };
-
static void InitializeIfNeeded();
- explicit TabIconView(TabIconViewModel* provider);
+ explicit TabIconView(chrome::TabIconViewModel* model);
virtual ~TabIconView();
// Invoke whenever the tab state changes or the throbber should update.
@@ -58,7 +49,7 @@ class TabIconView : public views::View {
bool filter);
// Our model.
- TabIconViewModel* model_;
+ chrome::TabIconViewModel* model_;
// Whether the throbber is running.
bool throbber_running_;
« no previous file with comments | « chrome/browser/ui/views/frame/opaque_browser_frame_view.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