Chromium Code Reviews| 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/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
| 10 #include "base/scoped_observer.h" | 10 #include "base/scoped_observer.h" |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 191 content::WebContents* GetCurrentWebContents(); | 191 content::WebContents* GetCurrentWebContents(); |
| 192 | 192 |
| 193 // Reorders the toolbar actions to reflect the model and, optionally, to | 193 // Reorders the toolbar actions to reflect the model and, optionally, to |
| 194 // "pop out" any overflowed actions that want to run (depending on the | 194 // "pop out" any overflowed actions that want to run (depending on the |
| 195 // value of |pop_out_actions_to_run|. | 195 // value of |pop_out_actions_to_run|. |
| 196 void ReorderActions(); | 196 void ReorderActions(); |
| 197 | 197 |
| 198 // Sets |overflowed_action_wants_to_run_| to the proper value. | 198 // Sets |overflowed_action_wants_to_run_| to the proper value. |
| 199 void SetOverflowedActionWantsToRun(); | 199 void SetOverflowedActionWantsToRun(); |
| 200 | 200 |
| 201 // Shows an extension message bubble, if any should be shown. | |
| 202 void MaybeShowExtensionBubble(); | |
| 203 | |
| 201 bool in_overflow_mode() const { return main_bar_ != nullptr; } | 204 bool in_overflow_mode() const { return main_bar_ != nullptr; } |
| 202 | 205 |
| 203 // The delegate for this object (in a real build, this is the view). | 206 // The delegate for this object (in a real build, this is the view). |
| 204 ToolbarActionsBarDelegate* delegate_; | 207 ToolbarActionsBarDelegate* delegate_; |
| 205 | 208 |
| 206 // The associated browser. | 209 // The associated browser. |
| 207 Browser* browser_; | 210 Browser* browser_; |
| 208 | 211 |
| 209 // The observed toolbar model. | 212 // The observed toolbar model. |
| 210 extensions::ExtensionToolbarModel* model_; | 213 extensions::ExtensionToolbarModel* model_; |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 240 static bool pop_out_actions_to_run_; | 243 static bool pop_out_actions_to_run_; |
| 241 | 244 |
| 242 // If set to false, notifications for OnOverflowedActionWantsToRunChanged() | 245 // If set to false, notifications for OnOverflowedActionWantsToRunChanged() |
| 243 // will not be sent. Used because in unit tests there is no wrench menu to | 246 // will not be sent. Used because in unit tests there is no wrench menu to |
| 244 // alter. | 247 // alter. |
| 245 static bool send_overflowed_action_changes_; | 248 static bool send_overflowed_action_changes_; |
| 246 | 249 |
| 247 // True if an action in the overflow menu wants to run. | 250 // True if an action in the overflow menu wants to run. |
| 248 bool overflowed_action_wants_to_run_; | 251 bool overflowed_action_wants_to_run_; |
| 249 | 252 |
| 253 // True if we have checked to see if there is an extension bubble to display, | |
| 254 // and done so if one exists. | |
|
Finnur
2015/04/10 11:24:21
nit: This comment is very confusing. Especially th
Devlin
2015/04/10 15:55:20
Done.
| |
| 255 bool checked_extension_bubble_; | |
| 256 | |
| 250 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBar); | 257 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBar); |
| 251 }; | 258 }; |
| 252 | 259 |
| 253 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_ | 260 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_ |
| OLD | NEW |