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

Unified Diff: chrome/browser/ui/views/location_bar/page_action_image_view.h

Issue 8333021: Fix a crash in PageActionImageView when extensions are reloaded due to incognito settings changing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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/views/location_bar/page_action_image_view.h
===================================================================
--- chrome/browser/ui/views/location_bar/page_action_image_view.h (revision 107550)
+++ chrome/browser/ui/views/location_bar/page_action_image_view.h (working copy)
@@ -25,7 +25,8 @@
class PageActionImageView : public views::ImageView,
public ImageLoadingTracker::Observer,
public ExtensionContextMenuModel::PopupDelegate,
- public ExtensionPopup::Observer {
+ public ExtensionPopup::Observer,
+ public content::NotificationObserver {
public:
PageActionImageView(LocationBarView* owner,
ExtensionAction* page_action);
@@ -58,6 +59,11 @@
// Overridden from ExtensionPopup::Observer
virtual void ExtensionPopupIsClosing(ExtensionPopup* popup) OVERRIDE;
+ // content::NotificationObserver implementation.
+ virtual void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
+
// Called to notify the PageAction that it should determine whether to be
// visible or hidden. |contents| is the TabContents that is active, |url| is
// the current page URL.
@@ -101,6 +107,8 @@
// The current popup and the button it came from. NULL if no popup.
ExtensionPopup* popup_;
+ content::NotificationRegistrar registrar_;
+
scoped_ptr<views::MenuRunner> menu_runner_;
DISALLOW_IMPLICIT_CONSTRUCTORS(PageActionImageView);

Powered by Google App Engine
This is Rietveld 408576698