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

Side by Side Diff: ui/views/controls/menu/menu_item_view.h

Issue 553233002: Dynamically calculate the number of extension icons to show per row in overflow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 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 UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_
6 #define UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ 6 #define UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 258
259 // Returns the command id of this item. 259 // Returns the command id of this item.
260 int GetCommand() const { return command_; } 260 int GetCommand() const { return command_; }
261 261
262 // Paints the menu item. 262 // Paints the menu item.
263 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 263 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
264 264
265 // Returns the preferred size of this item. 265 // Returns the preferred size of this item.
266 virtual gfx::Size GetPreferredSize() const OVERRIDE; 266 virtual gfx::Size GetPreferredSize() const OVERRIDE;
267 267
268 // Gets the preferred height for the given |width|. This is only different
269 // from GetPreferredSize().width() if the item has a child view with flexible
270 // dimensions.
271 virtual int GetHeightForWidth(int width) const OVERRIDE;
272
268 // Return the preferred dimensions of the item in pixel. 273 // Return the preferred dimensions of the item in pixel.
269 const MenuItemDimensions& GetDimensions() const; 274 const MenuItemDimensions& GetDimensions() const;
270 275
271 // Returns the object responsible for controlling showing the menu. 276 // Returns the object responsible for controlling showing the menu.
272 MenuController* GetMenuController(); 277 MenuController* GetMenuController();
273 const MenuController* GetMenuController() const; 278 const MenuController* GetMenuController() const;
274 279
275 // Returns the delegate. This returns the delegate of the root menu item. 280 // Returns the delegate. This returns the delegate of the root menu item.
276 MenuDelegate* GetDelegate(); 281 MenuDelegate* GetDelegate();
277 const MenuDelegate* GetDelegate() const; 282 const MenuDelegate* GetDelegate() const;
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 // If set to false, the right margin will be removed for menu lines 516 // If set to false, the right margin will be removed for menu lines
512 // containing other elements. 517 // containing other elements.
513 bool use_right_margin_; 518 bool use_right_margin_;
514 519
515 DISALLOW_COPY_AND_ASSIGN(MenuItemView); 520 DISALLOW_COPY_AND_ASSIGN(MenuItemView);
516 }; 521 };
517 522
518 } // namespace views 523 } // namespace views
519 524
520 #endif // UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ 525 #endif // UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.cc ('k') | ui/views/controls/menu/menu_item_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698