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

Unified Diff: chrome/browser/ui/views/dropdown_bar_view.h

Issue 1478303003: Converted all Views to use an InkDropDelegate instead of a InkDropAnimationController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed CustomButton::set_ink_drop_action_on_click() method. Created 5 years 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
« no previous file with comments | « chrome/browser/ui/views/dropdown_bar_host_delegate.h ('k') | chrome/browser/ui/views/dropdown_bar_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « chrome/browser/ui/views/dropdown_bar_host_delegate.h ('k') | chrome/browser/ui/views/dropdown_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698