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

Unified Diff: chrome/browser/ui/touch/tabs/touch_tab.h

Issue 7065052: Improve large tab strip by leveraging touch icons when present (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renaming as per tfarina Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/touch/tabs/touch_tab.h
diff --git a/chrome/browser/ui/touch/tabs/touch_tab.h b/chrome/browser/ui/touch/tabs/touch_tab.h
index b4ff409ed756abae2066c2952e6425e6a214d2d6..06f7096b1b826cae453f2b05d972f2dbada9db0b 100644
--- a/chrome/browser/ui/touch/tabs/touch_tab.h
+++ b/chrome/browser/ui/touch/tabs/touch_tab.h
@@ -12,6 +12,9 @@
#include "chrome/browser/ui/views/tabs/base_tab.h"
#include "ui/gfx/point.h"
+// The size of the favicon touch area.
+const int kTouchTargetIconSize = 32;
sky 2011/06/17 15:34:55 Make this is a static field of TouchTab, just like
Emmanuel Saint-loubert-Bié 2011/06/17 16:11:23 Done.
+
///////////////////////////////////////////////////////////////////////////////
//
// TouchTab
@@ -34,6 +37,14 @@ class TouchTab : public BaseTab {
background_offset_ = offset;
}
+ // get and set touch icon
+ void set_touch_icon(const SkBitmap& bitmap) {
+ touch_icon_ = bitmap;
+ }
+ const SkBitmap& touch_icon() const {
+ return touch_icon_;
+ }
+
// Returns the minimum possible size of a single unselected Tab.
static gfx::Size GetMinimumUnselectedSize();
@@ -74,6 +85,9 @@ class TouchTab : public BaseTab {
// The offset used to paint the inactive background image.
gfx::Point background_offset_;
+ // The touch icon found
+ SkBitmap touch_icon_;
+
// 'l' is for left
// 'c' is for center
// 'r' is for right

Powered by Google App Engine
This is Rietveld 408576698