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

Side by Side Diff: chrome/browser/ui/views/toolbar/browser_action_view.h

Issue 399143004: Open the WrenchMenu on mouseover when dragging a browser action (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for drag/drop not in menu Created 6 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTION_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTION_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTION_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTION_VIEW_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "chrome/browser/extensions/extension_action_icon_factory.h" 10 #include "chrome/browser/extensions/extension_action_icon_factory.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 // Called when the user clicks on the browser action icon. 51 // Called when the user clicks on the browser action icon.
52 virtual void OnBrowserActionExecuted(BrowserActionButton* button) = 0; 52 virtual void OnBrowserActionExecuted(BrowserActionButton* button) = 0;
53 53
54 // Called when a browser action becomes visible/hidden. 54 // Called when a browser action becomes visible/hidden.
55 virtual void OnBrowserActionVisibilityChanged() = 0; 55 virtual void OnBrowserActionVisibilityChanged() = 0;
56 56
57 // Whether the container for this button is shown inside a menu. 57 // Whether the container for this button is shown inside a menu.
58 virtual bool ShownInsideMenu() const = 0; 58 virtual bool ShownInsideMenu() const = 0;
59 59
60 // Notifies that a drag completed. Note this will only happen if the view
61 // wasn't removed during the drag-and-drop process.
Finnur 2014/07/18 10:40:40 ... as in the extension being uninstalled?
Devlin 2014/07/18 15:44:32 Not quite. We delete and recreate all the views e
62 virtual void OnBrowserActionViewDragDone() = 0;
63
60 protected: 64 protected:
61 virtual ~Delegate() {} 65 virtual ~Delegate() {}
62 }; 66 };
63 67
64 BrowserActionView(const extensions::Extension* extension, 68 BrowserActionView(const extensions::Extension* extension,
65 Browser* browser, 69 Browser* browser,
66 Delegate* delegate); 70 Delegate* delegate);
67 virtual ~BrowserActionView(); 71 virtual ~BrowserActionView();
68 72
69 BrowserActionButton* button() { return button_; } 73 BrowserActionButton* button() { return button_; }
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 // Gets the icon of this button and its badge. 198 // Gets the icon of this button and its badge.
195 gfx::ImageSkia GetIconWithBadge(); 199 gfx::ImageSkia GetIconWithBadge();
196 200
197 // Returns button icon so it can be accessed during tests. 201 // Returns button icon so it can be accessed during tests.
198 gfx::ImageSkia GetIconForTest(); 202 gfx::ImageSkia GetIconForTest();
199 203
200 protected: 204 protected:
201 // Overridden from views::View: 205 // Overridden from views::View:
202 virtual void ViewHierarchyChanged( 206 virtual void ViewHierarchyChanged(
203 const ViewHierarchyChangedDetails& details) OVERRIDE; 207 const ViewHierarchyChangedDetails& details) OVERRIDE;
208 virtual void OnDragDone() OVERRIDE;
204 209
205 private: 210 private:
206 virtual ~BrowserActionButton(); 211 virtual ~BrowserActionButton();
207 212
208 // Register an extension command if the extension has an active one. 213 // Register an extension command if the extension has an active one.
209 void MaybeRegisterExtensionCommand(); 214 void MaybeRegisterExtensionCommand();
210 215
211 // Unregisters an extension command, if the extension has registered one and 216 // Unregisters an extension command, if the extension has registered one and
212 // it is active. 217 // it is active.
213 void MaybeUnregisterExtensionCommand(bool only_if_active); 218 void MaybeUnregisterExtensionCommand(bool only_if_active);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 // The observer that we need to notify when the icon of the button has been 252 // The observer that we need to notify when the icon of the button has been
248 // updated. 253 // updated.
249 IconObserver* icon_observer_; 254 IconObserver* icon_observer_;
250 255
251 friend class base::DeleteHelper<BrowserActionButton>; 256 friend class base::DeleteHelper<BrowserActionButton>;
252 257
253 DISALLOW_COPY_AND_ASSIGN(BrowserActionButton); 258 DISALLOW_COPY_AND_ASSIGN(BrowserActionButton);
254 }; 259 };
255 260
256 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTION_VIEW_H_ 261 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTION_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698