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

Unified Diff: chrome/browser/views/extensions/browser_action_overflow_menu_controller.cc

Issue 549224: Support reordering of Browser Actions within the container. Currently does no... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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
« no previous file with comments | « chrome/browser/views/extensions/browser_action_drag_data_unittest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/extensions/browser_action_overflow_menu_controller.cc
===================================================================
--- chrome/browser/views/extensions/browser_action_overflow_menu_controller.cc (revision 37723)
+++ chrome/browser/views/extensions/browser_action_overflow_menu_controller.cc (working copy)
@@ -29,10 +29,14 @@
size_t command_id = 0;
for (size_t i = start_index; i < views_->size(); ++i) {
BrowserActionView* view = (*views_)[i];
+ SkBitmap icon =
+ view->button()->extension()->browser_action()->GetIcon(tab_id);
+ if (icon.isNull())
+ icon = view->button()->default_icon();
menu_->AppendMenuItemWithIcon(
command_id,
UTF8ToWide(view->button()->extension()->name()),
- view->button()->extension()->browser_action()->GetIcon(tab_id));
+ icon);
++command_id;
}
}
« no previous file with comments | « chrome/browser/views/extensions/browser_action_drag_data_unittest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698