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

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

Issue 379483003: Fix use-after-free in BrowserActionOverflowMenuController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 (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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 int start_index); 44 int start_index);
45 45
46 void set_observer(Observer* observer) { observer_ = observer; } 46 void set_observer(Observer* observer) { observer_ = observer; }
47 47
48 // Shows the overflow menu. 48 // Shows the overflow menu.
49 bool RunMenu(views::Widget* widget, bool for_drop); 49 bool RunMenu(views::Widget* widget, bool for_drop);
50 50
51 // Closes the overflow menu (and its context menu if open as well). 51 // Closes the overflow menu (and its context menu if open as well).
52 void CancelMenu(); 52 void CancelMenu();
53 53
54 // Notify the menu that the associated BrowserActionViews have been deleted.
55 void NotifyBrowserActionViewsDeleting();
56
54 // Overridden from views::MenuDelegate: 57 // Overridden from views::MenuDelegate:
55 virtual bool IsCommandEnabled(int id) const OVERRIDE; 58 virtual bool IsCommandEnabled(int id) const OVERRIDE;
56 virtual void ExecuteCommand(int id) OVERRIDE; 59 virtual void ExecuteCommand(int id) OVERRIDE;
57 virtual bool ShowContextMenu(views::MenuItemView* source, 60 virtual bool ShowContextMenu(views::MenuItemView* source,
58 int id, 61 int id,
59 const gfx::Point& p, 62 const gfx::Point& p,
60 ui::MenuSourceType source_type) OVERRIDE; 63 ui::MenuSourceType source_type) OVERRIDE;
61 virtual void DropMenuClosed(views::MenuItemView* menu) OVERRIDE; 64 virtual void DropMenuClosed(views::MenuItemView* menu) OVERRIDE;
62 // These drag functions offer support for dragging icons into the overflow 65 // These drag functions offer support for dragging icons into the overflow
63 // menu. 66 // menu.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // controller. The icon updater will update the menu item view's icon when 125 // controller. The icon updater will update the menu item view's icon when
123 // the browser action view's icon has been updated. 126 // the browser action view's icon has been updated.
124 ScopedVector<IconUpdater> icon_updaters_; 127 ScopedVector<IconUpdater> icon_updaters_;
125 128
126 friend class base::DeleteHelper<BrowserActionOverflowMenuController>; 129 friend class base::DeleteHelper<BrowserActionOverflowMenuController>;
127 130
128 DISALLOW_COPY_AND_ASSIGN(BrowserActionOverflowMenuController); 131 DISALLOW_COPY_AND_ASSIGN(BrowserActionOverflowMenuController);
129 }; 132 };
130 133
131 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_BROWSER_ACTION_OVERFLOW_MENU_CONTR OLLER_H_ 134 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_BROWSER_ACTION_OVERFLOW_MENU_CONTR OLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698