Index: chrome/browser/ui/views/dropdown_bar_view.h |
diff --git a/chrome/browser/ui/views/dropdown_bar_view.h b/chrome/browser/ui/views/dropdown_bar_view.h |
index 08bdcdb2637c11f034d540abc433131f11219be5..64b6951e37b74f667fe774597db67e9a94582494 100644 |
--- a/chrome/browser/ui/views/dropdown_bar_view.h |
+++ b/chrome/browser/ui/views/dropdown_bar_view.h |
@@ -26,7 +26,17 @@ class DropdownBarView : public views::AccessiblePaneView, |
explicit DropdownBarView(DropdownBarHost* host); |
~DropdownBarView() override; |
+ // Updates the view to let it know where the host is clipping the |
+ // dropdown widget (while animating the opening or closing of the widget). |
+ void SetAnimationOffset(int offset) override; |
+ |
+ // Returns the offset used while animating. |
+ int animation_offset() const { return animation_offset_; } |
+ |
protected: |
+ // views::View: |
+ void OnPaint(gfx::Canvas* canvas) override; |
+ |
// Returns the DropdownBarHost that manages this view. |
DropdownBarHost* host() const { return host_; } |
@@ -40,6 +50,12 @@ class DropdownBarView : public views::AccessiblePaneView, |
// The dropdown bar host that controls this view. |
DropdownBarHost* host_; |
+ // While animating, the host clips the widget and draws only the bottom |
+ // part of it. The view needs to know the pixel offset at which we are drawing |
+ // the widget so that we can draw the curved edges that attach to the toolbar |
+ // in the right location. |
+ int animation_offset_; |
+ |
DISALLOW_COPY_AND_ASSIGN(DropdownBarView); |
}; |
#endif // CHROME_BROWSER_UI_VIEWS_DROPDOWN_BAR_VIEW_H_ |