Index: chrome/browser/ui/views/location_bar/location_bar_view.h |
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.h b/chrome/browser/ui/views/location_bar/location_bar_view.h |
index f9a9442707b05fa6b3d9a492b5589d1ae2d7ba8c..872e1345bc46e9dfd83a45b0393c4a52535209c8 100644 |
--- a/chrome/browser/ui/views/location_bar/location_bar_view.h |
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.h |
@@ -79,6 +79,9 @@ class LocationBarView : public LocationBar, |
// The location bar view's class name. |
static const char kViewClassName[]; |
+ // Returns the offset used during dropdown animation. |
+ int dropdown_animation_offset() const { return dropdown_animation_offset_; } |
+ |
class Delegate { |
public: |
// Should return the current web contents. |
@@ -386,6 +389,7 @@ class LocationBarView : public LocationBar, |
// DropdownBarHostDelegate: |
void SetFocusAndSelection(bool select_all) override; |
+ void SetAnimationOffset(int offset) override; |
// TemplateURLServiceObserver: |
void OnTemplateURLServiceChanged() override; |
@@ -473,6 +477,12 @@ class LocationBarView : public LocationBar, |
// Tracks this preference to determine whether bookmark editing is allowed. |
BooleanPrefMember edit_bookmarks_enabled_; |
+ // During dropdown animation, 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 dropdown_animation_offset_; |
+ |
// This is a debug state variable that stores if the WebContents was null |
// during the last RefreshPageAction. |
bool web_contents_null_at_last_refresh_; |