| Index: chrome/browser/ui/gtk/location_bar_view_gtk.h
|
| diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.h b/chrome/browser/ui/gtk/location_bar_view_gtk.h
|
| index 3f3d4d84922555d7946b0a84e66b84a8e7fb0a55..4a0fbceb749b40ed981e37203c0f048863f9b916 100644
|
| --- a/chrome/browser/ui/gtk/location_bar_view_gtk.h
|
| +++ b/chrome/browser/ui/gtk/location_bar_view_gtk.h
|
| @@ -9,7 +9,6 @@
|
| #include <gtk/gtk.h>
|
|
|
| #include <map>
|
| -#include <set>
|
| #include <string>
|
|
|
| #include "base/basictypes.h"
|
| @@ -19,7 +18,6 @@
|
| #include "base/memory/weak_ptr.h"
|
| #include "chrome/browser/autocomplete/autocomplete_edit.h"
|
| #include "chrome/browser/command_updater.h"
|
| -#include "chrome/browser/extensions/action_box_controller.h"
|
| #include "chrome/browser/extensions/extension_context_menu_model.h"
|
| #include "chrome/browser/extensions/image_loading_tracker.h"
|
| #include "chrome/browser/prefs/pref_member.h"
|
| @@ -80,9 +78,10 @@ class LocationBarViewGtk : public AutocompleteEditController,
|
| // Returns the current WebContents.
|
| content::WebContents* GetWebContents() const;
|
|
|
| - // If |preview_enabled| is true, the view will display the
|
| - // This is used by the ExtensionInstalledBubbleGtk to preview what the icon
|
| + // Sets |preview_enabled| for the PageActionViewGtk associated with this
|
| + // |page_action|. If |preview_enabled| is true, the view will display the
|
| // page action's icon even though it has not been activated by the extension.
|
| + // This is used by the ExtensionInstalledBubbleGtk to preview what the icon
|
| // will look like for the user upon installation of the extension.
|
| void SetPreviewEnabledPageAction(ExtensionAction *page_action,
|
| bool preview_enabled);
|
| @@ -229,10 +228,16 @@ class LocationBarViewGtk : public AutocompleteEditController,
|
|
|
| ExtensionAction* page_action() { return page_action_; }
|
|
|
| - // Called to notify the PageAction that it should update based on the state
|
| - // of |page_action_|. |contents| is the WebContents that is active, |url|
|
| + void set_preview_enabled(bool preview_enabled) {
|
| + preview_enabled_ = preview_enabled;
|
| + }
|
| +
|
| + bool IsVisible();
|
| +
|
| + // Called to notify the PageAction that it should determine whether to be
|
| + // visible or hidden. |contents| is the WebContents that is active, |url|
|
| // is the current page URL.
|
| - void Update(content::WebContents* contents, const GURL& url);
|
| + void UpdateVisibility(content::WebContents* contents, const GURL& url);
|
|
|
| // A callback from ImageLoadingTracker for when the image has loaded.
|
| virtual void OnImageLoaded(const gfx::Image& image,
|
| @@ -311,6 +316,10 @@ class LocationBarViewGtk : public AutocompleteEditController,
|
| // The keybinding accelerator registered to show the page action popup.
|
| scoped_ptr<ui::AcceleratorGtk> keybinding_;
|
|
|
| + // This is used for post-install visual feedback. The page_action icon
|
| + // is briefly shown even if it hasn't been enabled by its extension.
|
| + bool preview_enabled_;
|
| +
|
| // The context menu view and model for this extension action.
|
| scoped_ptr<MenuGtk> context_menu_;
|
| scoped_refptr<ExtensionContextMenuModel> context_menu_model_;
|
| @@ -484,9 +493,6 @@ class LocationBarViewGtk : public AutocompleteEditController,
|
| // Used to change the visibility of the star decoration.
|
| BooleanPrefMember edit_bookmarks_enabled_;
|
|
|
| - // The extension actions which have "preview enabled".
|
| - std::set<ExtensionAction*> preview_enabled_actions_;
|
| -
|
| DISALLOW_COPY_AND_ASSIGN(LocationBarViewGtk);
|
| };
|
|
|
|
|