Index: chrome/browser/views/browser_actions_container.h |
=================================================================== |
--- chrome/browser/views/browser_actions_container.h (revision 42514) |
+++ chrome/browser/views/browser_actions_container.h (working copy) |
@@ -50,8 +50,10 @@ |
public NotificationObserver { |
public: |
BrowserActionButton(Extension* extension, BrowserActionsContainer* panel); |
- ~BrowserActionButton(); |
+ // Call this instead of delete. |
+ void Destroy(); |
+ |
ExtensionAction* browser_action() const { return browser_action_; } |
Extension* extension() { return extension_; } |
@@ -94,10 +96,12 @@ |
// Notifications when to set button state to pushed/not pushed (for when the |
// popup/context menu is hidden or shown by the container). |
- virtual void SetButtonPushed(); |
- virtual void SetButtonNotPushed(); |
+ void SetButtonPushed(); |
+ void SetButtonNotPushed(); |
private: |
+ virtual ~BrowserActionButton(); |
+ |
// The browser action this view represents. The ExtensionAction is not owned |
// by this class. |
ExtensionAction* browser_action_; |
@@ -124,6 +128,8 @@ |
NotificationRegistrar registrar_; |
+ friend class DeleteTask<BrowserActionButton>; |
+ |
DISALLOW_COPY_AND_ASSIGN(BrowserActionButton); |
}; |
@@ -136,6 +142,8 @@ |
class BrowserActionView : public views::View { |
public: |
BrowserActionView(Extension* extension, BrowserActionsContainer* panel); |
+ virtual ~BrowserActionView(); |
+ |
BrowserActionButton* button() { return button_; } |
// Allocates a canvas object on the heap and draws into it the icon for the |