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

Unified Diff: chrome/browser/ui/gtk/location_bar_view_gtk.h

Issue 10392142: Revert 137630 - Broke ASAN (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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
« no previous file with comments | « chrome/browser/extensions/page_action_controller.cc ('k') | chrome/browser/ui/gtk/location_bar_view_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/location_bar_view_gtk.h
===================================================================
--- chrome/browser/ui/gtk/location_bar_view_gtk.h (revision 137631)
+++ chrome/browser/ui/gtk/location_bar_view_gtk.h (working copy)
@@ -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 @@
// Returns the current WebContents.
content::WebContents* GetWebContents() const;
- // If |preview_enabled| is true, the view will display the
+ // 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
- // page action's icon even though it has not been activated by the extension.
// will look like for the user upon installation of the extension.
void SetPreviewEnabledPageAction(ExtensionAction *page_action,
bool preview_enabled);
@@ -229,10 +228,16 @@
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 @@
// 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 @@
// 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);
};
« no previous file with comments | « chrome/browser/extensions/page_action_controller.cc ('k') | chrome/browser/ui/gtk/location_bar_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698