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

Side by Side Diff: trunk/src/chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h

Issue 416903002: Revert 285142 "Open the WrenchMenu on mouseover when dragging a ..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_EXTENSION_TOOLBAR_MENU_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_EXTENSION_TOOLBAR_MENU_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_EXTENSION_TOOLBAR_MENU_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_EXTENSION_TOOLBAR_MENU_VIEW_H_
7 7
8 #include "base/memory/weak_ptr.h"
9 #include "base/scoped_observer.h"
10 #include "chrome/browser/ui/views/toolbar/browser_actions_container_observer.h"
11 #include "ui/views/view.h" 8 #include "ui/views/view.h"
12 9
13 class Browser; 10 class Browser;
14 class BrowserActionsContainer; 11 class BrowserActionsContainer;
15 class WrenchMenu;
16 12
17 // ExtensionToolbarMenuView is the view containing the extension actions that 13 // ExtensionToolbarMenuView is the view containing the extension actions that
18 // overflowed from the BrowserActionsContainer, and is contained in and owned by 14 // overflowed from the BrowserActionsContainer, and is contained in and owned by
19 // the wrench menu. 15 // the wrench menu.
20 // In the event that the WrenchMenu was opened for an Extension Action drag-and- 16 class ExtensionToolbarMenuView : public views::View {
21 // drop, this will also close the menu upon completion.
22 class ExtensionToolbarMenuView : public views::View,
23 public BrowserActionsContainerObserver {
24 public: 17 public:
25 ExtensionToolbarMenuView(Browser* browser, WrenchMenu* wrench_menu); 18 explicit ExtensionToolbarMenuView(Browser* browser);
26 virtual ~ExtensionToolbarMenuView(); 19 virtual ~ExtensionToolbarMenuView();
27 20
28 // views::View: 21 // views::View:
29 virtual gfx::Size GetPreferredSize() const OVERRIDE; 22 virtual gfx::Size GetPreferredSize() const OVERRIDE;
30 virtual void Layout() OVERRIDE; 23 virtual void Layout() OVERRIDE;
31 24
32 private: 25 private:
33 // BrowserActionsContainerObserver:
34 virtual void OnBrowserActionDragDone() OVERRIDE;
35
36 // The associated browser.
37 Browser* browser_; 26 Browser* browser_;
38
39 // The WrenchMenu, which may need to be closed after a drag-and-drop.
40 WrenchMenu* wrench_menu_;
41
42 // The overflow BrowserActionsContainer which is nested in this view.
43 BrowserActionsContainer* container_; 27 BrowserActionsContainer* container_;
44 28
45 ScopedObserver<BrowserActionsContainer, BrowserActionsContainerObserver>
46 browser_actions_container_observer_;
47
48 DISALLOW_COPY_AND_ASSIGN(ExtensionToolbarMenuView); 29 DISALLOW_COPY_AND_ASSIGN(ExtensionToolbarMenuView);
49 }; 30 };
50 31
51 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_EXTENSION_TOOLBAR_MENU_VIEW_H_ 32 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_EXTENSION_TOOLBAR_MENU_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698