summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/tabs/tab_overview_cell.h
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-08 23:23:05 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-08 23:23:05 +0000
commit37cd3a96b55aac1dad9016c05e78b5983972f985 (patch)
tree1159bb8897fa21faeadde942163412736889ead9 /chrome/browser/views/tabs/tab_overview_cell.h
parent4d4c0b94960366979943dbe4e3c8880ce80dbdef (diff)
downloadchromium_src-37cd3a96b55aac1dad9016c05e78b5983972f985.zip
chromium_src-37cd3a96b55aac1dad9016c05e78b5983972f985.tar.gz
chromium_src-37cd3a96b55aac1dad9016c05e78b5983972f985.tar.bz2
First part of tab overview. It isn't wired up, nor is it complete, but
it's a good enough stage that I want to check it in. BUG=none TEST=none Review URL: http://codereview.chromium.org/119329 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17906 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/tabs/tab_overview_cell.h')
-rw-r--r--chrome/browser/views/tabs/tab_overview_cell.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/chrome/browser/views/tabs/tab_overview_cell.h b/chrome/browser/views/tabs/tab_overview_cell.h
new file mode 100644
index 0000000..b492972
--- /dev/null
+++ b/chrome/browser/views/tabs/tab_overview_cell.h
@@ -0,0 +1,42 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_VIEWS_TABS_TAB_OVERVIEW_CELL_H_
+#define CHROME_BROWSER_VIEWS_TABS_TAB_OVERVIEW_CELL_H_
+
+#include "base/string16.h"
+#include "third_party/skia/include/core/SkBitmap.h"
+#include "views/view.h"
+
+namespace views {
+class ImageView;
+class Label;
+}
+
+// A single cell displayed by TabOverviewGrid. TabOverviewCell contains a
+// label, favicon and thumnbail.
+class TabOverviewCell : public views::View {
+ public:
+ TabOverviewCell();
+
+ void SetThumbnail(const SkBitmap& thumbnail);
+ void SetTitle(const string16& title);
+ void SetFavIcon(const SkBitmap& favicon);
+
+ // Returns true if the specified point, in the bounds of the cell, is over
+ // the thumbnail.
+ bool IsPointInThumbnail(const gfx::Point& point);
+
+ // View overrides.
+ virtual gfx::Size GetPreferredSize();
+
+ private:
+ views::Label* title_label_;
+ views::ImageView* thumbnail_view_;
+ views::ImageView* fav_icon_view_;
+
+ DISALLOW_COPY_AND_ASSIGN(TabOverviewCell);
+};
+
+#endif // CHROME_BROWSER_VIEWS_TABS_TAB_OVERVIEW_CELL_H_