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

Unified Diff: chrome/browser/views/browser_actions_container.h

Issue 1237004: Views: fix a crash where in the browser actions container.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/views/browser_actions_container.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | chrome/browser/views/browser_actions_container.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698