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

Unified Diff: chrome/browser/ui/views/location_bar/location_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: 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/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_;

Powered by Google App Engine
This is Rietveld 408576698