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

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

Issue 376014: Reland Extension Installed InfoBubble (Closed)
Patch Set: Created 11 years, 1 month 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 | « chrome/browser/views/info_bubble.cc ('k') | chrome/browser/views/location_bar_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/location_bar_view.h
diff --git a/chrome/browser/views/location_bar_view.h b/chrome/browser/views/location_bar_view.h
index 8bac24255f6276eeb910989011012f119d886188..26d562b8926559841a897b45d28c57937b859e58 100644
--- a/chrome/browser/views/location_bar_view.h
+++ b/chrome/browser/views/location_bar_view.h
@@ -95,6 +95,17 @@ class LocationBarView : public LocationBar,
void SetProfile(Profile* profile);
Profile* profile() { return profile_; }
+ // Sets |preview_enabled| for the PageAction View associated with this
+ // |page_action|. If |preview_enabled| is true, the view will display the
+ // PageActions icon even though it has not been activated by the extension.
+ // This is used by the ExtensionInstalledBubble to preview what the icon
+ // will look like for the user upon installation of the extension.
+ void SetPreviewEnabledPageAction(ExtensionAction *page_action,
+ bool preview_enabled);
+
+ // Retrieves the PageAction View which is associated with |page_action|
+ views::View* GetPageActionView(ExtensionAction* page_action);
+
// Sizing functions
virtual gfx::Size GetPreferredSize();
@@ -360,6 +371,10 @@ class LocationBarView : public LocationBar,
int current_tab_id() { return current_tab_id_; }
+ void set_preview_enabled(bool preview_enabled) {
+ preview_enabled_ = preview_enabled;
+ }
+
// Overridden from view.
virtual void OnMouseMoved(const views::MouseEvent& event);
virtual bool OnMousePressed(const views::MouseEvent& event);
@@ -406,6 +421,10 @@ class LocationBarView : public LocationBar,
// The string to show for a tooltip;
std::string tooltip_;
+ // This is used for post-install visual feedback. The page_action icon
+ // is briefly shown even if it hasn't been enabled by it's extension.
+ bool preview_enabled_;
+
DISALLOW_COPY_AND_ASSIGN(PageActionImageView);
};
friend class PageActionImageView;
« no previous file with comments | « chrome/browser/views/info_bubble.cc ('k') | chrome/browser/views/location_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698