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

Unified Diff: chrome/browser/ui/views/dropdown_bar_host.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: Added missing include. 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
Index: chrome/browser/ui/views/dropdown_bar_host.h
diff --git a/chrome/browser/ui/views/dropdown_bar_host.h b/chrome/browser/ui/views/dropdown_bar_host.h
index c212158de0c84a072844527c1c466f296890a105..bf335a7995db41b7266261ba78d1cad1c661370f 100644
--- a/chrome/browser/ui/views/dropdown_bar_host.h
+++ b/chrome/browser/ui/views/dropdown_bar_host.h
@@ -74,9 +74,9 @@ class DropdownBarHost : public ui::AcceleratorTarget,
virtual gfx::Rect GetDialogPosition(gfx::Rect avoid_overlapping_rect) = 0;
// Moves the widget to the provided location, moves it to top
- // in the z-order (HWND_TOP, not HWND_TOPMOST for windows), and sets the size
- // of the |view_|.
- virtual void SetDialogPosition(const gfx::Rect& new_pos);
+ // in the z-order (HWND_TOP, not HWND_TOPMOST for windows) and shows
+ // the widget (if hidden).
+ virtual void SetDialogPosition(const gfx::Rect& new_pos) = 0;
// Overridden from views::FocusChangeListener:
void OnWillChangeFocus(views::View* focused_before,
@@ -132,6 +132,9 @@ class DropdownBarHost : public ui::AcceleratorTarget,
// Returns the host widget.
views::Widget* host() const { return host_.get(); }
+ // Returns the animation offset.
+ int animation_offset() const { return animation_offset_; }
+
// Retrieves the boundary that the dropdown widget has to work with
// within the Chrome frame window. The boundary differs depending on
// the dropdown bar implementation. The default implementation
@@ -153,14 +156,14 @@ class DropdownBarHost : public ui::AcceleratorTarget,
// The BrowserView that created us.
BrowserView* browser_view_;
- // A parent View to |view_| that is used to clip when animating the bar
- // between the shown and hidden states.
- views::View* clip_view_;
-
// Our view, which is responsible for drawing the UI.
views::View* view_;
DropdownBarHostDelegate* delegate_;
+ // The y position pixel offset of the widget while animating the
+ // dropdown widget.
+ int animation_offset_;
+
// The animation class to use when opening the Dropdown widget.
scoped_ptr<gfx::SlideAnimation> animation_;

Powered by Google App Engine
This is Rietveld 408576698