| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_TOUCH_TABS_TOUCH_TAB_H_ | |
| 6 #define CHROME_BROWSER_UI_TOUCH_TABS_TOUCH_TAB_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "chrome/browser/ui/views/tabs/tab.h" | |
| 10 | |
| 11 /////////////////////////////////////////////////////////////////////////////// | |
| 12 // | |
| 13 // TouchTab | |
| 14 // | |
| 15 // A View that renders a TouchTab in a TouchTabStrip | |
| 16 // | |
| 17 /////////////////////////////////////////////////////////////////////////////// | |
| 18 class TouchTab : public Tab { | |
| 19 public: | |
| 20 // The size of the favicon touch area. | |
| 21 static const int kTouchTargetIconSize = 32; | |
| 22 | |
| 23 explicit TouchTab(TabController* controller); | |
| 24 virtual ~TouchTab(); | |
| 25 | |
| 26 // get and set touch icon | |
| 27 void set_touch_icon(const SkBitmap& bitmap) { | |
| 28 touch_icon_ = bitmap; | |
| 29 } | |
| 30 const SkBitmap& touch_icon() const { | |
| 31 return touch_icon_; | |
| 32 } | |
| 33 | |
| 34 protected: | |
| 35 // Returns whether the Tab should display a close button. | |
| 36 virtual bool ShouldShowCloseBox() const OVERRIDE; | |
| 37 | |
| 38 private: | |
| 39 // The touch icon found | |
| 40 SkBitmap touch_icon_; | |
| 41 | |
| 42 DISALLOW_COPY_AND_ASSIGN(TouchTab); | |
| 43 }; | |
| 44 | |
| 45 #endif // CHROME_BROWSER_UI_TOUCH_TABS_TOUCH_TAB_H_ | |
| OLD | NEW |