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

Unified Diff: views/controls/menu/submenu_view.cc

Issue 7349021: Convert some more view methods to the ui/views style. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/controls/menu/menu_scroll_view_container.cc ('k') | views/controls/scroll_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/menu/submenu_view.cc
===================================================================
--- views/controls/menu/submenu_view.cc (revision 92600)
+++ views/controls/menu/submenu_view.cc (working copy)
@@ -55,7 +55,7 @@
int SubmenuView::GetMenuItemCount() {
int count = 0;
for (int i = 0; i < child_count(); ++i) {
- if (GetChildViewAt(i)->id() == MenuItemView::kMenuItemViewID)
+ if (child_at(i)->id() == MenuItemView::kMenuItemViewID)
count++;
}
return count;
@@ -63,9 +63,9 @@
MenuItemView* SubmenuView::GetMenuItemAt(int index) {
for (int i = 0, count = 0; i < child_count(); ++i) {
- if (GetChildViewAt(i)->id() == MenuItemView::kMenuItemViewID &&
+ if (child_at(i)->id() == MenuItemView::kMenuItemViewID &&
count++ == index) {
- return static_cast<MenuItemView*>(GetChildViewAt(i));
+ return static_cast<MenuItemView*>(child_at(i));
}
}
NOTREACHED();
@@ -91,7 +91,7 @@
int y = insets.top();
int menu_item_width = width() - insets.width();
for (int i = 0; i < child_count(); ++i) {
- View* child = GetChildViewAt(i);
+ View* child = child_at(i);
if (child->IsVisible()) {
gfx::Size child_pref_size = child->GetPreferredSize();
child->SetBounds(x, y, menu_item_width, child_pref_size.height());
@@ -108,7 +108,7 @@
int max_width = 0;
int height = 0;
for (int i = 0; i < child_count(); ++i) {
- View* child = GetChildViewAt(i);
+ View* child = child_at(i);
gfx::Size child_pref_size = child->IsVisible() ?
child->GetPreferredSize() : gfx::Size();
max_width = std::max(max_width, child_pref_size.width());
« no previous file with comments | « views/controls/menu/menu_scroll_view_container.cc ('k') | views/controls/scroll_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698