Chromium Code Reviews| 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 c53f40ce0532355350c1a1157a205614f4261671..a759cc7610b108756ed0162270f7173aeb3eefef 100644 |
| --- a/chrome/browser/ui/views/dropdown_bar_host.h |
| +++ b/chrome/browser/ui/views/dropdown_bar_host.h |
| @@ -45,8 +45,18 @@ class DropdownBarHost : public views::AcceleratorTarget, |
| explicit DropdownBarHost(BrowserView* browser_view); |
| virtual ~DropdownBarHost(); |
| + class Delegate { |
|
sky
2011/05/03 18:38:32
Declare this in a separate class so folks don't ne
SteveT
2011/05/06 18:48:43
From what we can see in many other places, the Del
sky
2011/05/06 19:56:06
From https://sites.google.com/a/chromium.org/dev/d
SteveT
2011/05/06 22:13:40
Done.
|
| + public: |
| + // Claims focus for the text field and selects its contents. |
| + virtual void SetFocusAndSelection(bool select_all) = 0; |
| + |
| + // Updates the view to let it know where the host is clipping the |
| + // dropdown widget (while animating the opening or closing of the widget). |
| + virtual void set_animation_offset(int offset) = 0; |
| + }; |
| + |
| // Initializes the dropdown bar host with the give view. |
|
sky
2011/05/03 18:38:32
'give' -> 'given'
SteveT
2011/05/06 18:48:43
Done.
|
| - void Init(DropdownBarView* view); |
| + void Init(views::View* view, Delegate* delegate); |
|
sky
2011/05/03 18:38:32
Can delegate be passed to the constructor?
SteveT
2011/05/06 18:48:43
It gets a bit hairy here if I move the Delegate in
|
| // Whether we are animating the position of the dropdown widget. |
| bool IsAnimating() const; |
| @@ -101,7 +111,7 @@ class DropdownBarHost : public views::AcceleratorTarget, |
| protected: |
| // Returns the dropdown bar view. |
| - DropdownBarView* view() const { return view_; } |
| + views::View* view() const { return view_; } |
| // Returns the focus tracker. |
| views::ExternalFocusTracker* focus_tracker() const { |
| @@ -154,7 +164,8 @@ class DropdownBarHost : public views::AcceleratorTarget, |
| BrowserView* browser_view_; |
| // Our view, which is responsible for drawing the UI. |
| - DropdownBarView* view_; |
| + views::View* view_; |
| + Delegate* delegate_; |
| // The y position pixel offset of the widget while animating the |
| // dropdown widget. |