Chromium Code Reviews| 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 89a34d0121a5b1cc8b0edbb5444a7283df292097..e36354717b612a1a1c14ffd619a6868045199a26 100644 |
| --- a/chrome/browser/ui/views/location_bar/location_bar_view.h |
| +++ b/chrome/browser/ui/views/location_bar/location_bar_view.h |
| @@ -18,6 +18,7 @@ |
| #include "chrome/browser/search_engines/template_url_model_observer.h" |
| #include "chrome/browser/ui/omnibox/location_bar.h" |
| #include "chrome/browser/ui/toolbar/toolbar_model.h" |
| +#include "chrome/browser/ui/views/dropdown_bar_host.h" |
| #include "chrome/browser/ui/views/extensions/extension_popup.h" |
| #include "ui/gfx/font.h" |
| #include "ui/gfx/rect.h" |
| @@ -67,12 +68,20 @@ class LocationBarView : public LocationBar, |
| public views::View, |
| public views::DragController, |
| public AutocompleteEditController, |
| + public DropdownBarHost::Delegate, |
| public TemplateURLModelObserver, |
| public NotificationObserver { |
| public: |
| // The location bar view's class name. |
| static const char kViewClassName[]; |
| + // DropdownBarHost::Delegate |
| + virtual void set_animation_offset(int offset) OVERRIDE; |
| + virtual void SetFocusAndSelection(bool select_all) OVERRIDE; |
| + |
| + // Returns the offset used while animating. |
| + int animation_offset() const { return animation_offset_; } |
| + |
| class Delegate { |
| public: |
| // Should return the current tab contents. |
| @@ -412,6 +421,12 @@ class LocationBarView : public LocationBar, |
| // Tracks this preference to determine whether bookmark editing is allowed. |
| BooleanPrefMember edit_bookmarks_enabled_; |
| + // 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_; |
|
sky
2011/05/03 18:38:32
Initialize this to 0.
SteveT
2011/05/06 18:48:43
Done.
|
| + |
| DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); |
| }; |