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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 size_t VisibleBrowserActions() const; | 180 size_t VisibleBrowserActions() const; |
181 | 181 |
182 // Returns how many actions will be visible once the container finishes | 182 // Returns how many actions will be visible once the container finishes |
183 // animating to a new size, or (if not animating) the currently visible icons. | 183 // animating to a new size, or (if not animating) the currently visible icons. |
184 size_t VisibleBrowserActionsAfterAnimation() const; | 184 size_t VisibleBrowserActionsAfterAnimation() const; |
185 | 185 |
186 // Executes |command| registered by |extension|. | 186 // Executes |command| registered by |extension|. |
187 void ExecuteExtensionCommand(const extensions::Extension* extension, | 187 void ExecuteExtensionCommand(const extensions::Extension* extension, |
188 const extensions::Command& command); | 188 const extensions::Command& command); |
189 | 189 |
| 190 // Hides the currently-active popup, if there is one. |
| 191 void HideActivePopup(); |
| 192 |
190 // Add or remove an observer. | 193 // Add or remove an observer. |
191 void AddObserver(BrowserActionsContainerObserver* observer); | 194 void AddObserver(BrowserActionsContainerObserver* observer); |
192 void RemoveObserver(BrowserActionsContainerObserver* observer); | 195 void RemoveObserver(BrowserActionsContainerObserver* observer); |
193 | 196 |
194 // Overridden from views::View: | 197 // Overridden from views::View: |
195 gfx::Size GetPreferredSize() const override; | 198 gfx::Size GetPreferredSize() const override; |
196 int GetHeightForWidth(int width) const override; | 199 int GetHeightForWidth(int width) const override; |
197 gfx::Size GetMinimumSize() const override; | 200 gfx::Size GetMinimumSize() const override; |
198 void Layout() override; | 201 void Layout() override; |
199 bool GetDropFormats( | 202 bool GetDropFormats( |
(...skipping 22 matching lines...) Expand all Loading... |
222 void AnimationProgressed(const gfx::Animation* animation) override; | 225 void AnimationProgressed(const gfx::Animation* animation) override; |
223 void AnimationCanceled(const gfx::Animation* animation) override; | 226 void AnimationCanceled(const gfx::Animation* animation) override; |
224 void AnimationEnded(const gfx::Animation* animation) override; | 227 void AnimationEnded(const gfx::Animation* animation) override; |
225 | 228 |
226 // Overridden from ToolbarActionView::Delegate: | 229 // Overridden from ToolbarActionView::Delegate: |
227 content::WebContents* GetCurrentWebContents() override; | 230 content::WebContents* GetCurrentWebContents() override; |
228 bool ShownInsideMenu() const override; | 231 bool ShownInsideMenu() const override; |
229 void OnToolbarActionViewDragDone() override; | 232 void OnToolbarActionViewDragDone() override; |
230 views::MenuButton* GetOverflowReferenceView() override; | 233 views::MenuButton* GetOverflowReferenceView() override; |
231 void SetPopupOwner(ToolbarActionView* popup_owner) override; | 234 void SetPopupOwner(ToolbarActionView* popup_owner) override; |
232 void HideActivePopup() override; | |
233 ToolbarActionView* GetMainViewForAction(ToolbarActionView* view) override; | 235 ToolbarActionView* GetMainViewForAction(ToolbarActionView* view) override; |
234 | 236 |
235 // ToolbarActionsBarDelegate: | 237 // ToolbarActionsBarDelegate: |
236 void AddViewForAction(ToolbarActionViewController* action, | 238 void AddViewForAction(ToolbarActionViewController* action, |
237 size_t index) override; | 239 size_t index) override; |
238 void RemoveViewForAction(ToolbarActionViewController* action) override; | 240 void RemoveViewForAction(ToolbarActionViewController* action) override; |
239 void RemoveAllViews() override; | 241 void RemoveAllViews() override; |
240 void Redraw(bool order_changed) override; | 242 void Redraw(bool order_changed) override; |
241 void ResizeAndAnimate(gfx::Tween::Type tween_type, | 243 void ResizeAndAnimate(gfx::Tween::Type tween_type, |
242 int target_width, | 244 int target_width, |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 | 337 |
336 // The class that registers for keyboard shortcuts for extension commands. | 338 // The class that registers for keyboard shortcuts for extension commands. |
337 scoped_ptr<ExtensionKeybindingRegistryViews> extension_keybinding_registry_; | 339 scoped_ptr<ExtensionKeybindingRegistryViews> extension_keybinding_registry_; |
338 | 340 |
339 ObserverList<BrowserActionsContainerObserver> observers_; | 341 ObserverList<BrowserActionsContainerObserver> observers_; |
340 | 342 |
341 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer); | 343 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer); |
342 }; | 344 }; |
343 | 345 |
344 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_ | 346 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_ |
OLD | NEW |