OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_ |
7 | 7 |
8 #include "base/observer_list.h" | 8 #include "base/observer_list.h" |
9 #include "chrome/browser/extensions/extension_keybinding_registry.h" | 9 #include "chrome/browser/extensions/extension_keybinding_registry.h" |
10 #include "chrome/browser/ui/toolbar/toolbar_actions_bar.h" | 10 #include "chrome/browser/ui/toolbar/toolbar_actions_bar.h" |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 ToolbarActionView* GetToolbarActionViewAt(int index) { | 161 ToolbarActionView* GetToolbarActionViewAt(int index) { |
162 return toolbar_action_views_[index]; | 162 return toolbar_action_views_[index]; |
163 } | 163 } |
164 | 164 |
165 // Whether we are performing resize animation on the container. | 165 // Whether we are performing resize animation on the container. |
166 bool animating() const { | 166 bool animating() const { |
167 return resize_animation_ && resize_animation_->is_animating(); | 167 return resize_animation_ && resize_animation_->is_animating(); |
168 } | 168 } |
169 | 169 |
170 // Returns the ID of the action represented by the view at |index|. | 170 // Returns the ID of the action represented by the view at |index|. |
171 const std::string& GetIdAt(size_t index) const; | 171 std::string GetIdAt(size_t index) const; |
172 | 172 |
173 // Returns the ToolbarActionView* associated with the given |extension|, or | 173 // Returns the ToolbarActionView* associated with the given |extension|, or |
174 // NULL if none exists. | 174 // NULL if none exists. |
175 ToolbarActionView* GetViewForId(const std::string& id); | 175 ToolbarActionView* GetViewForId(const std::string& id); |
176 | 176 |
177 // Update the views to reflect the state of the toolbar actions. | 177 // Update the views to reflect the state of the toolbar actions. |
178 void RefreshToolbarActionViews(); | 178 void RefreshToolbarActionViews(); |
179 | 179 |
180 // Returns how many actions are currently visible. If the intent is to find | 180 // Returns how many actions are currently visible. If the intent is to find |
181 // how many are visible once the container finishes animation, see | 181 // how many are visible once the container finishes animation, see |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 | 348 |
349 // The extension bubble that is actively showing, if any. | 349 // The extension bubble that is actively showing, if any. |
350 views::BubbleDelegateView* active_bubble_; | 350 views::BubbleDelegateView* active_bubble_; |
351 | 351 |
352 base::ObserverList<BrowserActionsContainerObserver> observers_; | 352 base::ObserverList<BrowserActionsContainerObserver> observers_; |
353 | 353 |
354 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer); | 354 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer); |
355 }; | 355 }; |
356 | 356 |
357 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_ | 357 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_ |
OLD | NEW |