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

Side by Side Diff: chrome/browser/ui/views/extensions/browser_action_overflow_menu_controller.h

Issue 331993009: MacViews: Run native Cocoa context menus to support Services. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add VIEWS_EXPORT for unit test access 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_EXTENSIONS_BROWSER_ACTION_OVERFLOW_MENU_CONTROLL ER_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_BROWSER_ACTION_OVERFLOW_MENU_CONTROLL ER_H_
6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_BROWSER_ACTION_OVERFLOW_MENU_CONTROLL ER_H_ 6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_BROWSER_ACTION_OVERFLOW_MENU_CONTROLL ER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 23 matching lines...) Expand all
34 public: 34 public:
35 virtual void NotifyMenuDeleted( 35 virtual void NotifyMenuDeleted(
36 BrowserActionOverflowMenuController* controller) = 0; 36 BrowserActionOverflowMenuController* controller) = 0;
37 }; 37 };
38 38
39 BrowserActionOverflowMenuController( 39 BrowserActionOverflowMenuController(
40 BrowserActionsContainer* owner, 40 BrowserActionsContainer* owner,
41 Browser* browser, 41 Browser* browser,
42 views::MenuButton* menu_button, 42 views::MenuButton* menu_button,
43 const std::vector<BrowserActionView*>& views, 43 const std::vector<BrowserActionView*>& views,
44 int start_index); 44 int start_index,
45 bool for_drop);
45 46
46 void set_observer(Observer* observer) { observer_ = observer; } 47 void set_observer(Observer* observer) { observer_ = observer; }
47 48
48 // Shows the overflow menu. 49 // Shows the overflow menu.
49 bool RunMenu(views::Widget* widget, bool for_drop); 50 bool RunMenu(views::Widget* widget);
50 51
51 // Closes the overflow menu (and its context menu if open as well). 52 // Closes the overflow menu (and its context menu if open as well).
52 void CancelMenu(); 53 void CancelMenu();
53 54
54 // Overridden from views::MenuDelegate: 55 // Overridden from views::MenuDelegate:
55 virtual bool IsCommandEnabled(int id) const OVERRIDE; 56 virtual bool IsCommandEnabled(int id) const OVERRIDE;
56 virtual void ExecuteCommand(int id) OVERRIDE; 57 virtual void ExecuteCommand(int id) OVERRIDE;
57 virtual bool ShowContextMenu(views::MenuItemView* source, 58 virtual bool ShowContextMenu(views::MenuItemView* source,
58 int id, 59 int id,
59 const gfx::Point& p, 60 const gfx::Point& p,
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // controller. The icon updater will update the menu item view's icon when 123 // controller. The icon updater will update the menu item view's icon when
123 // the browser action view's icon has been updated. 124 // the browser action view's icon has been updated.
124 ScopedVector<IconUpdater> icon_updaters_; 125 ScopedVector<IconUpdater> icon_updaters_;
125 126
126 friend class base::DeleteHelper<BrowserActionOverflowMenuController>; 127 friend class base::DeleteHelper<BrowserActionOverflowMenuController>;
127 128
128 DISALLOW_COPY_AND_ASSIGN(BrowserActionOverflowMenuController); 129 DISALLOW_COPY_AND_ASSIGN(BrowserActionOverflowMenuController);
129 }; 130 };
130 131
131 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_BROWSER_ACTION_OVERFLOW_MENU_CONTR OLLER_H_ 132 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_BROWSER_ACTION_OVERFLOW_MENU_CONTR OLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698