diff options
author | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-07 02:51:18 +0000 |
---|---|---|
committer | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-07 02:51:18 +0000 |
commit | bb74cb05646499f540935db6b23b0d603e14aa22 (patch) | |
tree | 48e7417391bb0554508102bdb0464dd332222d1d /chrome/browser/views/location_bar_view.h | |
parent | 7978508d53990b762518d993a1f42dbd3dfc429a (diff) | |
download | chromium_src-bb74cb05646499f540935db6b23b0d603e14aa22.zip chromium_src-bb74cb05646499f540935db6b23b0d603e14aa22.tar.gz chromium_src-bb74cb05646499f540935db6b23b0d603e14aa22.tar.bz2 |
Reland Extension Installed InfoBubble
(fix mac build breakage)
This creates UI feedback upon successful installation of an extension. An InfoBubble is shown containing the install icon and some information about how to manage extensions.
TEST=Install a packaged extension. Verify the InfoBubble is shown, with the install icon and some description. The InfoBubble should disappear when the bubble looses focus (click elsewhere). For a browserAction, the bubble should point to the browserAction icon. For a pageAction **that has a "default_icon" set in it's manifest (see the samples/subscribe_page_action in this CL)**, it should point to a temporarily shown pageAction icon that will be hidden when the bubble closes. Otherwise it should point to the wrench menu.
BUG=21412
TBR=willchan
Review URL: http://codereview.chromium.org/376014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31365 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/location_bar_view.h')
-rw-r--r-- | chrome/browser/views/location_bar_view.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/chrome/browser/views/location_bar_view.h b/chrome/browser/views/location_bar_view.h index 8bac242..26d562b 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; |