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

Unified Diff: chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.cc

Issue 1477253002: Use a single views::MenuConfig instance for each platform (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add menu_config_android Created 5 years 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
« no previous file with comments | « chrome/browser/ui/views/toolbar/app_menu.cc ('k') | ui/views/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.cc
diff --git a/chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.cc b/chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.cc
index 20e3fabded214b51906d5161d50baadd0b971d4b..0232e6c2544b2a32f9d4e0b00760f2d9ccaa9799 100644
--- a/chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.cc
+++ b/chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.cc
@@ -74,8 +74,7 @@ gfx::Size ExtensionToolbarMenuView::GetPreferredSize() const {
int ExtensionToolbarMenuView::GetHeightForWidth(int width) const {
// The width passed in here includes the full width of the menu, so we need
// to omit the necessary padding.
- const views::MenuConfig& menu_config =
- static_cast<const views::MenuItemView*>(parent())->GetMenuConfig();
+ const views::MenuConfig& menu_config = views::MenuConfig::instance();
int end_padding = menu_config.arrow_to_edge_padding -
container_->toolbar_actions_bar()->platform_settings().item_spacing;
width -= start_padding() + end_padding;
« no previous file with comments | « chrome/browser/ui/views/toolbar/app_menu.cc ('k') | ui/views/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698