Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(788)

Unified Diff: chrome/browser/ui/toolbar/toolbar_actions_model.h

Issue 2076093004: [Extensions UI] Handle multiple warning bubbles racing to show (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win tests Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/toolbar/toolbar_actions_model.h
diff --git a/chrome/browser/ui/toolbar/toolbar_actions_model.h b/chrome/browser/ui/toolbar/toolbar_actions_model.h
index b3029ec8bc11e8a789d7d5add0bda3515ee80e43..b8b99d536d65d794271752be8f3c83fc5d9e60fa 100644
--- a/chrome/browser/ui/toolbar/toolbar_actions_model.h
+++ b/chrome/browser/ui/toolbar/toolbar_actions_model.h
@@ -29,6 +29,7 @@ class ToolbarActionViewController;
namespace extensions {
class ExtensionActionManager;
+class ExtensionMessageBubbleController;
class ExtensionRegistry;
class ExtensionSet;
}
@@ -172,6 +173,11 @@ class ToolbarActionsModel
bool is_highlighting() const { return highlight_type_ != HIGHLIGHT_NONE; }
HighlightType highlight_type() const { return highlight_type_; }
+ bool has_active_bubble() const { return has_active_bubble_; }
+ void set_has_active_bubble(bool has_active_bubble) {
+ has_active_bubble_ = has_active_bubble;
+ }
+
void SetActionVisibility(const std::string& action_id, bool visible);
// ComponentMigrationHelper::ComponentActionDelegate:
@@ -193,6 +199,11 @@ class ToolbarActionsModel
// number of visible icons will be reset to what it was before highlighting.
void StopHighlighting();
+ // Gets the ExtensionMessageBubbleController that should be shown for this
+ // profile, if any.
+ std::unique_ptr<extensions::ExtensionMessageBubbleController>
+ GetExtensionMessageBubbleController(Browser* browser);
+
private:
// Callback when actions are ready.
void OnReady();
@@ -312,6 +323,10 @@ class ToolbarActionsModel
// visible, instead of overloading this one.
int visible_icon_count_;
+ // Whether or not there is an active ExtensionMessageBubbleController
+ // associated with the profile. There should only be one at a time.
+ bool has_active_bubble_;
+
ScopedObserver<extensions::ExtensionActionAPI,
extensions::ExtensionActionAPI::Observer>
extension_action_observer_;
« no previous file with comments | « chrome/browser/ui/toolbar/toolbar_actions_bar.cc ('k') | chrome/browser/ui/toolbar/toolbar_actions_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698