| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 : ToolbarActionsModel::HIGHLIGHT_NONE; | 242 : ToolbarActionsModel::HIGHLIGHT_NONE; |
| 243 } | 243 } |
| 244 const PlatformSettings& platform_settings() const { | 244 const PlatformSettings& platform_settings() const { |
| 245 return platform_settings_; | 245 return platform_settings_; |
| 246 } | 246 } |
| 247 ToolbarActionViewController* popup_owner() { return popup_owner_; } | 247 ToolbarActionViewController* popup_owner() { return popup_owner_; } |
| 248 ToolbarActionViewController* popped_out_action() { | 248 ToolbarActionViewController* popped_out_action() { |
| 249 return popped_out_action_; | 249 return popped_out_action_; |
| 250 } | 250 } |
| 251 bool in_overflow_mode() const { return main_bar_ != nullptr; } | 251 bool in_overflow_mode() const { return main_bar_ != nullptr; } |
| 252 bool is_showing_bubble() const { return is_showing_bubble_; } |
| 252 | 253 |
| 253 ToolbarActionsBarDelegate* delegate_for_test() { return delegate_; } | 254 ToolbarActionsBarDelegate* delegate_for_test() { return delegate_; } |
| 254 | 255 |
| 255 // During testing we can disable animations by setting this flag to true, | 256 // During testing we can disable animations by setting this flag to true, |
| 256 // so that the bar resizes instantly, instead of having to poll it while it | 257 // so that the bar resizes instantly, instead of having to poll it while it |
| 257 // animates to open/closed status. | 258 // animates to open/closed status. |
| 258 static bool disable_animations_for_testing_; | 259 static bool disable_animations_for_testing_; |
| 259 static void set_extension_bubble_appearance_wait_time_for_testing( | 260 static void set_extension_bubble_appearance_wait_time_for_testing( |
| 260 int time_in_seconds); | 261 int time_in_seconds); |
| 261 | 262 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 286 | 287 |
| 287 // Returns the current web contents. | 288 // Returns the current web contents. |
| 288 content::WebContents* GetCurrentWebContents(); | 289 content::WebContents* GetCurrentWebContents(); |
| 289 | 290 |
| 290 // Reorders the toolbar actions to reflect the model and, optionally, to | 291 // Reorders the toolbar actions to reflect the model and, optionally, to |
| 291 // "pop out" any overflowed actions that want to run (depending on the | 292 // "pop out" any overflowed actions that want to run (depending on the |
| 292 // value of |pop_out_actions_to_run|. | 293 // value of |pop_out_actions_to_run|. |
| 293 void ReorderActions(); | 294 void ReorderActions(); |
| 294 | 295 |
| 295 // Shows an extension message bubble, if any should be shown. | 296 // Shows an extension message bubble, if any should be shown. |
| 296 void MaybeShowExtensionBubble( | 297 void MaybeShowExtensionBubble(); |
| 297 std::unique_ptr<extensions::ExtensionMessageBubbleController> controller); | |
| 298 | 298 |
| 299 // The delegate for this object (in a real build, this is the view). | 299 // The delegate for this object (in a real build, this is the view). |
| 300 ToolbarActionsBarDelegate* delegate_; | 300 ToolbarActionsBarDelegate* delegate_; |
| 301 | 301 |
| 302 // The associated browser. | 302 // The associated browser. |
| 303 Browser* browser_; | 303 Browser* browser_; |
| 304 | 304 |
| 305 // The observed toolbar model. | 305 // The observed toolbar model. |
| 306 ToolbarActionsModel* model_; | 306 ToolbarActionsModel* model_; |
| 307 | 307 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 ScopedObserver<TabStripModel, TabStripModelObserver> tab_strip_observer_; | 365 ScopedObserver<TabStripModel, TabStripModelObserver> tab_strip_observer_; |
| 366 | 366 |
| 367 base::ObserverList<ToolbarActionsBarObserver> observers_; | 367 base::ObserverList<ToolbarActionsBarObserver> observers_; |
| 368 | 368 |
| 369 base::WeakPtrFactory<ToolbarActionsBar> weak_ptr_factory_; | 369 base::WeakPtrFactory<ToolbarActionsBar> weak_ptr_factory_; |
| 370 | 370 |
| 371 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBar); | 371 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBar); |
| 372 }; | 372 }; |
| 373 | 373 |
| 374 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_ | 374 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_ |
| OLD | NEW |