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

Unified Diff: chrome/browser/ui/views/infobars/infobar_view.h

Issue 7969024: Merge 101958 - Attempt at fixing crash in menus shown from infobars. Here's what the (Closed) Base URL: svn://svn.chromium.org/chrome/branches/874/src/
Patch Set: Created 9 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/infobars/infobar_view.h
===================================================================
--- chrome/browser/ui/views/infobars/infobar_view.h (revision 102374)
+++ chrome/browser/ui/views/infobars/infobar_view.h (working copy)
@@ -12,8 +12,12 @@
#include "chrome/browser/tab_contents/infobar_container.h"
#include "third_party/skia/include/core/SkPath.h"
#include "views/controls/button/button.h"
+#include "views/controls/menu/menu_item_view.h"
#include "views/focus/focus_manager.h"
+namespace ui {
+class MenuModel;
+}
namespace views {
class ExternalFocusTracker;
class ImageButton;
@@ -22,6 +26,7 @@
class Link;
class LinkListener;
class MenuButton;
+class MenuRunner;
class TextButton;
class ViewMenuDelegate;
}
@@ -83,6 +88,12 @@
// Convenience getter.
const InfoBarContainer::Delegate* container_delegate() const;
+ // Show a menu at the specified position. By invoking this InfobarView ensures
+ // the menu is destroyed at the appropriate time.
+ void RunMenuAt(ui::MenuModel* menu_model,
+ views::MenuButton* button,
+ views::MenuItemView::AnchorPosition anchor);
+
private:
static const int kHorizontalPadding;
@@ -115,6 +126,9 @@
SkPath fill_path_;
SkPath stroke_path_;
+ // Used to run the menu.
+ scoped_ptr<views::MenuRunner> menu_runner_;
+
DISALLOW_COPY_AND_ASSIGN(InfoBarView);
};
« no previous file with comments | « chrome/browser/ui/views/infobars/extension_infobar.cc ('k') | chrome/browser/ui/views/infobars/infobar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698