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

Unified Diff: views/controls/menu/menu_item_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_controller.cc ('k') | views/controls/menu/menu_scroll_view_container.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/menu/menu_item_view.cc
===================================================================
--- views/controls/menu/menu_item_view.cc (revision 92600)
+++ views/controls/menu/menu_item_view.cc (working copy)
@@ -289,7 +289,7 @@
DCHECK_LE(0, index);
DCHECK_GT(submenu_->child_count(), index);
- View* item = submenu_->GetChildViewAt(index);
+ View* item = submenu_->child_at(index);
DCHECK(item);
submenu_->RemoveChildView(item);
@@ -446,7 +446,7 @@
if (!HasSubmenu())
return NULL;
for (int i = 0; i < GetSubmenu()->child_count(); ++i) {
- View* child = GetSubmenu()->GetChildViewAt(i);
+ View* child = GetSubmenu()->child_at(i);
if (child->id() == MenuItemView::kMenuItemViewID) {
MenuItemView* result = static_cast<MenuItemView*>(child)->
GetMenuItemByID(id);
@@ -487,7 +487,7 @@
if (child_count() == 1 && GetTitle().size() == 0) {
// We only have one child and no title so let the view take over all the
// space.
- View* child = GetChildViewAt(0);
+ View* child = child_at(0);
gfx::Size size = child->GetPreferredSize();
child->SetBounds(label_start_, GetTopMargin(), size.width(), size.height());
} else {
@@ -495,7 +495,7 @@
// right align start with the last view and progress to the first.
for (int i = child_count() - 1, x = width() - item_right_margin_; i >= 0;
--i) {
- View* child = GetChildViewAt(i);
+ View* child = child_at(i);
int width = child->GetPreferredSize().width();
child->SetBounds(x - width, 0, width, height());
x -= width - kChildXPadding;
@@ -667,7 +667,7 @@
// Iterate backwards as we may end up removing views, which alters the child
// view count.
for (int i = submenu_->child_count() - 1; i >= 0; --i) {
- View* child = submenu_->GetChildViewAt(i);
+ View* child = submenu_->child_at(i);
if (child->id() == MenuItemView::kMenuItemViewID) {
MenuItemView* menu_item = static_cast<MenuItemView*>(child);
if (menu_item->HasSubmenu())
@@ -745,7 +745,7 @@
return gfx::Size();
if (GetTitle().size() == 0 && child_count() == 1) {
- View* child = GetChildViewAt(0);
+ View* child = child_at(0);
return child->GetPreferredSize();
}
@@ -753,7 +753,7 @@
for (int i = 0; i < child_count(); ++i) {
if (i)
width += kChildXPadding;
- width += GetChildViewAt(i)->GetPreferredSize().width();
+ width += child_at(i)->GetPreferredSize().width();
}
// Return a height of 0 to indicate that we should use the title height
// instead.
« no previous file with comments | « views/controls/menu/menu_controller.cc ('k') | views/controls/menu/menu_scroll_view_container.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698