| Index: chrome/browser/ui/views/tabs/tab_controller.h
|
| diff --git a/chrome/browser/ui/views/tabs/tab_controller.h b/chrome/browser/ui/views/tabs/tab_controller.h
|
| index 90d0d0d3670bfb4a0770f2e56eb5f4a95411061a..88e61a1847aeb997c3f689c6d99f958a013abbf3 100644
|
| --- a/chrome/browser/ui/views/tabs/tab_controller.h
|
| +++ b/chrome/browser/ui/views/tabs/tab_controller.h
|
| @@ -5,6 +5,7 @@
|
| #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_CONTROLLER_H_
|
| #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_CONTROLLER_H_
|
|
|
| +#include "base/callback_forward.h"
|
| #include "chrome/browser/ui/views/tabs/tab_strip_types.h"
|
| #include "third_party/skia/include/core/SkColor.h"
|
| #include "ui/base/ui_base_types.h"
|
| @@ -12,6 +13,7 @@
|
| class Tab;
|
|
|
| namespace gfx {
|
| +class Path;
|
| class Point;
|
| class Size;
|
| }
|
| @@ -37,6 +39,9 @@ class TabController {
|
| // to be hidden.
|
| virtual bool ShouldHideCloseButtonForInactiveTabs() = 0;
|
|
|
| + // Returns true if ShouldPaintTab() could return a non-empty clip path.
|
| + virtual bool MaySetClip() = 0;
|
| +
|
| // Selects the tab.
|
| virtual void SelectTab(Tab* tab) = 0;
|
|
|
| @@ -92,10 +97,16 @@ class TabController {
|
| virtual void OnMouseEventInTab(views::View* source,
|
| const ui::MouseEvent& event) = 0;
|
|
|
| - // Returns true if |tab| needs to be painted. If false is returned the tab is
|
| - // not painted. If true is returned the tab should be painted and |clip| is
|
| - // set to the clip (if |clip| is empty means no clip).
|
| - virtual bool ShouldPaintTab(const Tab* tab, gfx::Rect* clip) = 0;
|
| + // Returns whether |tab| needs to be painted. When this returns true, |clip|
|
| + // is set to the path which should be clipped out of the current tab's region
|
| + // (for hit testing or painting), if any. |clip| is only non-empty when
|
| + // stacking tabs; if it is empty, no clipping is needed. |border_callback| is
|
| + // a callback which returns a tab's border given its size, and is used in
|
| + // computing |clip|.
|
| + virtual bool ShouldPaintTab(
|
| + const Tab* tab,
|
| + const base::Callback<gfx::Path(const gfx::Size&)>& border_callback,
|
| + gfx::Path* clip) = 0;
|
|
|
| // Returns true if tab loading throbbers can be painted to a composited layer.
|
| // This can only be done when the TabController can guarantee that nothing
|
|
|