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

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

Issue 789763004: Fix disappearing page actions bug. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from pkasting. Created 6 years 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/location_bar_view.h
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.h b/chrome/browser/ui/views/location_bar/location_bar_view.h
index c3eff2c908100644ca2ed3ed230781f0d179494c..e2c661874cceed5b61f4aecb6c861fbf5aa7257a 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.h
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.h
@@ -301,7 +301,8 @@ class LocationBarView : public LocationBar,
// of at least one of the views in |content_setting_views_| changed.
bool RefreshContentSettingViews();
- // Deletes all page action views that we have created.
+ // Clears |page_action_views_| and removes the elements from the view
+ // hierarchy.
void DeletePageActionViews();
// Updates the views for the Page Actions, to reflect state changes for
@@ -309,6 +310,10 @@ class LocationBarView : public LocationBar,
// changed, or PageActionWithBadgeView were created/destroyed.
bool RefreshPageActionViews();
+ // Whether the page actions represented by |page_action_views_| differ
+ // in ordering or value from |page_actions|.
+ bool PageActionsDiffer(const PageActions& page_actions);
Mike Wittman 2014/12/23 01:21:56 make const?
erikchen 2014/12/23 01:29:36 Done.
+
// Updates the view for the zoom icon based on the current tab's zoom. Returns
// true if the visibility of the view changed.
bool RefreshZoomView();
@@ -351,7 +356,7 @@ class LocationBarView : public LocationBar,
void UpdateContentSettingsIcons() override;
void UpdateManagePasswordsIconAndBubble() override;
void UpdatePageActions() override;
- void InvalidatePageActions() override;
+ void RefreshPageActions() override;
void UpdateBookmarkStarVisibility() override;
bool ShowPageActionPopup(const extensions::Extension* extension,
bool grant_active_tab) override;
@@ -473,9 +478,6 @@ class LocationBarView : public LocationBar,
// The manage passwords icon.
ManagePasswordsIconView* manage_passwords_icon_view_;
- // The current page actions.
- PageActions page_actions_;
-
// The page action icon views.
PageActionViews page_action_views_;

Powered by Google App Engine
This is Rietveld 408576698