| Index: chrome/browser/extensions/script_badge_controller.h
|
| diff --git a/chrome/browser/extensions/script_badge_controller.h b/chrome/browser/extensions/script_badge_controller.h
|
| index a2fa7930cda3eb24b12cb541702891c2031f930a..8a81deb2a5eb051a4f0a59c1c62e4b3e3ff37349 100644
|
| --- a/chrome/browser/extensions/script_badge_controller.h
|
| +++ b/chrome/browser/extensions/script_badge_controller.h
|
| @@ -54,6 +54,7 @@ class ScriptBadgeController
|
|
|
| // LocationBarController implementation.
|
| virtual std::vector<ExtensionAction*> GetCurrentActions() const OVERRIDE;
|
| + virtual void GetAttentionFor(const std::string& extension_id) OVERRIDE;
|
| virtual Action OnClicked(const std::string& extension_id,
|
| int mouse_button) OVERRIDE;
|
| virtual void NotifyChange() OVERRIDE;
|
| @@ -86,9 +87,16 @@ class ScriptBadgeController
|
| void OnContentScriptsExecuting(const std::set<std::string>& extension_ids,
|
| int32 page_id);
|
|
|
| - // Tries to insert an extension into the relevant collections, and returns
|
| - // whether any change was made.
|
| - bool InsertExtension(const std::string& extension_id);
|
| + // Adds the extension's icon to the list of script badges. Returns
|
| + // the script badge ExtensionAction that was added, or NULL if
|
| + // extension_id isn't valid.
|
| + ExtensionAction* AddExtensionToCurrentActions(
|
| + const std::string& extension_id);
|
| +
|
| + // Called when an extension is running script on the current tab,
|
| + // and tries to insert an extension into the relevant collections.
|
| + // Returns true if any change was made.
|
| + bool MarkExtensionExecuting(const std::string& extension_id);
|
|
|
| // Tries to erase an extension from the relevant collections, and returns
|
| // whether any change was made.
|
| @@ -97,11 +105,12 @@ class ScriptBadgeController
|
| // Our parent TabContents.
|
| TabContents* tab_contents_;
|
|
|
| - // The current extension actions in the order they appeared.
|
| + // The current extension actions in the order they appeared. These come from
|
| + // calls to ExecuteScript or getAttention on the current frame.
|
| std::vector<ExtensionAction*> current_actions_;
|
|
|
| - // The extensions that have called ExecuteScript on the current frame.
|
| - std::set<std::string> extensions_executing_scripts_;
|
| + // The extensions that have actions in current_actions_.
|
| + std::set<std::string> extensions_in_current_actions_;
|
|
|
| // Listen to extension unloaded notifications.
|
| content::NotificationRegistrar registrar_;
|
|
|