| OLD | NEW | 
|    1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |    1 // Copyright (c) 2012 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_TABS_TAB_H_ |    5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ | 
|    6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ |    6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ | 
|    7 #pragma once |    7 #pragma once | 
|    8  |    8  | 
|    9 #include <string> |    9 #include <string> | 
|   10  |   10  | 
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   61   // BaseTab overrides: |   61   // BaseTab overrides: | 
|   62   virtual const gfx::Rect& GetTitleBounds() const OVERRIDE; |   62   virtual const gfx::Rect& GetTitleBounds() const OVERRIDE; | 
|   63   virtual const gfx::Rect& GetIconBounds() const OVERRIDE; |   63   virtual const gfx::Rect& GetIconBounds() const OVERRIDE; | 
|   64   virtual void DataChanged(const TabRendererData& old) OVERRIDE; |   64   virtual void DataChanged(const TabRendererData& old) OVERRIDE; | 
|   65  |   65  | 
|   66   // Returns whether the Tab should display a close button. |   66   // Returns whether the Tab should display a close button. | 
|   67   virtual bool ShouldShowCloseBox() const; |   67   virtual bool ShouldShowCloseBox() const; | 
|   68  |   68  | 
|   69  private: |   69  private: | 
|   70   // Overridden from views::View: |   70   // Overridden from views::View: | 
|   71   virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |   71   virtual void OnPaint(gfx::CanvasSkia* canvas) OVERRIDE; | 
|   72   virtual void Layout() OVERRIDE; |   72   virtual void Layout() OVERRIDE; | 
|   73   virtual void OnThemeChanged() OVERRIDE; |   73   virtual void OnThemeChanged() OVERRIDE; | 
|   74   virtual std::string GetClassName() const OVERRIDE; |   74   virtual std::string GetClassName() const OVERRIDE; | 
|   75   virtual bool HasHitTestMask() const OVERRIDE; |   75   virtual bool HasHitTestMask() const OVERRIDE; | 
|   76   virtual void GetHitTestMask(gfx::Path* path) const OVERRIDE; |   76   virtual void GetHitTestMask(gfx::Path* path) const OVERRIDE; | 
|   77   virtual bool GetTooltipTextOrigin(const gfx::Point& p, |   77   virtual bool GetTooltipTextOrigin(const gfx::Point& p, | 
|   78                                     gfx::Point* origin) const OVERRIDE; |   78                                     gfx::Point* origin) const OVERRIDE; | 
|   79   virtual void OnMouseMoved(const views::MouseEvent& event) OVERRIDE; |   79   virtual void OnMouseMoved(const views::MouseEvent& event) OVERRIDE; | 
|   80  |   80  | 
|   81   // Paint various portions of the Tab |   81   // Paint various portions of the Tab | 
|   82   void PaintTabBackground(gfx::Canvas* canvas); |   82   void PaintTabBackground(gfx::CanvasSkia* canvas); | 
|   83   void PaintInactiveTabBackgroundWithTitleChange(gfx::Canvas* canvas); |   83   void PaintInactiveTabBackgroundWithTitleChange(gfx::CanvasSkia* canvas); | 
|   84   void PaintInactiveTabBackground(gfx::Canvas* canvas); |   84   void PaintInactiveTabBackground(gfx::CanvasSkia* canvas); | 
|   85   void PaintActiveTabBackground(gfx::Canvas* canvas); |   85   void PaintActiveTabBackground(gfx::CanvasSkia* canvas); | 
|   86  |   86  | 
|   87   // Returns the number of favicon-size elements that can fit in the tab's |   87   // Returns the number of favicon-size elements that can fit in the tab's | 
|   88   // current size. |   88   // current size. | 
|   89   int IconCapacity() const; |   89   int IconCapacity() const; | 
|   90  |   90  | 
|   91   // Returns whether the Tab should display a favicon. |   91   // Returns whether the Tab should display a favicon. | 
|   92   bool ShouldShowIcon() const; |   92   bool ShouldShowIcon() const; | 
|   93  |   93  | 
|   94   // Gets the throb value for the tab. When a tab is not selected the |   94   // Gets the throb value for the tab. When a tab is not selected the | 
|   95   // active background is drawn at |GetThrobValue()|%. This is used for hover, |   95   // active background is drawn at |GetThrobValue()|%. This is used for hover, | 
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  138  |  138  | 
|  139   // The current color of the close button. |  139   // The current color of the close button. | 
|  140   SkColor close_button_color_; |  140   SkColor close_button_color_; | 
|  141  |  141  | 
|  142   static bool initialized_; |  142   static bool initialized_; | 
|  143  |  143  | 
|  144   DISALLOW_COPY_AND_ASSIGN(Tab); |  144   DISALLOW_COPY_AND_ASSIGN(Tab); | 
|  145 }; |  145 }; | 
|  146  |  146  | 
|  147 #endif  // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ |  147 #endif  // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ | 
| OLD | NEW |