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

Unified Diff: chrome/browser/ui/views/toolbar/browser_action_view.h

Issue 547303003: Keep reference view pressed while extension actions have a popup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: VIEWS_EXPORT fix Created 6 years, 3 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
Index: chrome/browser/ui/views/toolbar/browser_action_view.h
diff --git a/chrome/browser/ui/views/toolbar/browser_action_view.h b/chrome/browser/ui/views/toolbar/browser_action_view.h
index 16a70149e2229a78bc33011b663b7aff0c84ca67..389e9f92355e24f6d4da04cba04016ad196cec7e 100644
--- a/chrome/browser/ui/views/toolbar/browser_action_view.h
+++ b/chrome/browser/ui/views/toolbar/browser_action_view.h
@@ -56,7 +56,7 @@ class BrowserActionView : public views::MenuButton,
// Returns the view of the browser actions overflow menu to use as a
// reference point for a popup when this view isn't visible.
- virtual views::View* GetOverflowReferenceView() = 0;
+ virtual views::MenuButton* GetOverflowReferenceView() = 0;
// Sets the delegate's active popup owner to be |popup_owner|.
virtual void SetPopupOwner(BrowserActionView* popup_owner) = 0;
@@ -134,11 +134,6 @@ class BrowserActionView : public views::MenuButton,
virtual scoped_ptr<views::LabelButtonBorder> CreateDefaultBorder() const
OVERRIDE;
- // Notifications when to set button state to pushed/not pushed (for when the
- // popup/context menu is hidden or shown by the container).
- void SetButtonPushed();
- void SetButtonNotPushed();
-
// Whether the browser action is enabled on this tab. Note that we cannot use
// the built-in views enabled/SetEnabled because disabled views do not
// receive drag events.
@@ -167,13 +162,12 @@ class BrowserActionView : public views::MenuButton,
virtual ExtensionActionViewController* GetPreferredPopupViewController()
OVERRIDE;
virtual views::View* GetReferenceViewForPopup() OVERRIDE;
+ virtual views::MenuButton* GetContextMenuButton() OVERRIDE;
virtual content::WebContents* GetCurrentWebContents() OVERRIDE;
virtual void HideActivePopup() OVERRIDE;
virtual void OnIconUpdated() OVERRIDE;
virtual void OnPopupShown(bool grant_tab_permissions) OVERRIDE;
virtual void CleanupPopup() OVERRIDE;
- virtual void OnWillShowContextMenus() OVERRIDE;
- virtual void OnContextMenuDone() OVERRIDE;
// The controller for this ExtensionAction view.
scoped_ptr<ExtensionActionViewController> view_controller_;
@@ -190,6 +184,9 @@ class BrowserActionView : public views::MenuButton,
// updated.
IconObserver* icon_observer_;
+ // A lock to keep the MenuButton pressed when a menu or popup is visible.
+ scoped_ptr<views::MenuButton::PressedLock> pressed_lock_;
+
DISALLOW_COPY_AND_ASSIGN(BrowserActionView);
};
« no previous file with comments | « chrome/browser/ui/views/location_bar/page_action_image_view.cc ('k') | chrome/browser/ui/views/toolbar/browser_action_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698