| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_ | 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_ |
| 6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_ | 6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 // Undoes the current "pop out"; i.e., moves the popped out action back into | 142 // Undoes the current "pop out"; i.e., moves the popped out action back into |
| 143 // overflow. | 143 // overflow. |
| 144 void UndoPopOut(); | 144 void UndoPopOut(); |
| 145 | 145 |
| 146 // Sets the active popup owner to be |popup_owner|. | 146 // Sets the active popup owner to be |popup_owner|. |
| 147 void SetPopupOwner(ToolbarActionViewController* popup_owner); | 147 void SetPopupOwner(ToolbarActionViewController* popup_owner); |
| 148 | 148 |
| 149 // Hides the actively showing popup, if any. | 149 // Hides the actively showing popup, if any. |
| 150 void HideActivePopup(); | 150 void HideActivePopup(); |
| 151 | 151 |
| 152 // Sets the active sidebar owner to be |sidebar_owner|. |
| 153 void SetSidebarOwner(ToolbarActionViewController* sidebar_owner); |
| 154 |
| 155 // Hides the actively showing sidebar, if any. |
| 156 void HideActiveSidebar(); |
| 157 |
| 152 // Returns the main (i.e., not overflow) controller for the given action. | 158 // Returns the main (i.e., not overflow) controller for the given action. |
| 153 ToolbarActionViewController* GetMainControllerForAction( | 159 ToolbarActionViewController* GetMainControllerForAction( |
| 154 ToolbarActionViewController* action); | 160 ToolbarActionViewController* action); |
| 155 | 161 |
| 156 // Returns the underlying toolbar actions, but does not order them. Primarily | 162 // Returns the underlying toolbar actions, but does not order them. Primarily |
| 157 // for use in testing. | 163 // for use in testing. |
| 158 const std::vector<ToolbarActionViewController*>& toolbar_actions_unordered() | 164 const std::vector<ToolbarActionViewController*>& toolbar_actions_unordered() |
| 159 const { | 165 const { |
| 160 return toolbar_actions_.get(); | 166 return toolbar_actions_.get(); |
| 161 } | 167 } |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 // Platform-specific settings for dimensions and the overflow chevron. | 249 // Platform-specific settings for dimensions and the overflow chevron. |
| 244 PlatformSettings platform_settings_; | 250 PlatformSettings platform_settings_; |
| 245 | 251 |
| 246 // The toolbar actions. | 252 // The toolbar actions. |
| 247 ToolbarActions toolbar_actions_; | 253 ToolbarActions toolbar_actions_; |
| 248 | 254 |
| 249 // The action that triggered the current popup (just a reference to an action | 255 // The action that triggered the current popup (just a reference to an action |
| 250 // from toolbar_actions_). | 256 // from toolbar_actions_). |
| 251 ToolbarActionViewController* popup_owner_; | 257 ToolbarActionViewController* popup_owner_; |
| 252 | 258 |
| 259 // The action that triggered the current sidebar (just a reference to an |
| 260 // action from toolbar_actions_). |
| 261 ToolbarActionViewController* sidebar_owner_; |
| 262 |
| 253 ScopedObserver<extensions::ExtensionToolbarModel, | 263 ScopedObserver<extensions::ExtensionToolbarModel, |
| 254 extensions::ExtensionToolbarModel::Observer> model_observer_; | 264 extensions::ExtensionToolbarModel::Observer> model_observer_; |
| 255 | 265 |
| 256 // True if we should suppress layout, such as when we are creating or | 266 // True if we should suppress layout, such as when we are creating or |
| 257 // adjusting a lot of actions at once. | 267 // adjusting a lot of actions at once. |
| 258 bool suppress_layout_; | 268 bool suppress_layout_; |
| 259 | 269 |
| 260 // True if we should suppress animation; we do this when first creating the | 270 // True if we should suppress animation; we do this when first creating the |
| 261 // toolbar, and also when switching tabs changes the state of the icons. | 271 // toolbar, and also when switching tabs changes the state of the icons. |
| 262 bool suppress_animation_; | 272 bool suppress_animation_; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 289 // The controller of the bubble to show once animation finishes, if any. | 299 // The controller of the bubble to show once animation finishes, if any. |
| 290 scoped_ptr<extensions::ExtensionMessageBubbleController> | 300 scoped_ptr<extensions::ExtensionMessageBubbleController> |
| 291 pending_extension_bubble_controller_; | 301 pending_extension_bubble_controller_; |
| 292 | 302 |
| 293 base::WeakPtrFactory<ToolbarActionsBar> weak_ptr_factory_; | 303 base::WeakPtrFactory<ToolbarActionsBar> weak_ptr_factory_; |
| 294 | 304 |
| 295 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBar); | 305 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBar); |
| 296 }; | 306 }; |
| 297 | 307 |
| 298 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_ | 308 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_ |
| OLD | NEW |