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

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

Issue 7057014: Variety of tweaks to View API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 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/native_control.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 86083)
+++ 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)->GetID() == MenuItemView::kMenuItemViewID)
+ if (GetChildViewAt(i)->id() == MenuItemView::kMenuItemViewID)
count++;
}
return count;
@@ -63,7 +63,7 @@
MenuItemView* SubmenuView::GetMenuItemAt(int index) {
for (int i = 0, count = 0; i < child_count(); ++i) {
- if (GetChildViewAt(i)->GetID() == MenuItemView::kMenuItemViewID &&
+ if (GetChildViewAt(i)->id() == MenuItemView::kMenuItemViewID &&
count++ == index) {
return static_cast<MenuItemView*>(GetChildViewAt(i));
}
@@ -92,7 +92,7 @@
int menu_item_width = width() - insets.width();
for (int i = 0; i < child_count(); ++i) {
View* child = GetChildViewAt(i);
- if (child->IsVisible()) {
+ if (child->visible()) {
gfx::Size child_pref_size = child->GetPreferredSize();
child->SetBounds(x, y, menu_item_width, child_pref_size.height());
y += child_pref_size.height();
@@ -109,11 +109,11 @@
int height = 0;
for (int i = 0; i < child_count(); ++i) {
View* child = GetChildViewAt(i);
- gfx::Size child_pref_size = child->IsVisible() ?
+ gfx::Size child_pref_size = child->visible() ?
child->GetPreferredSize() : gfx::Size();
max_width = std::max(max_width, child_pref_size.width());
height += child_pref_size.height();
- if (child->GetID() == MenuItemView::kMenuItemViewID) {
+ if (child->id() == MenuItemView::kMenuItemViewID) {
MenuItemView* menu = static_cast<MenuItemView*>(child);
max_accelerator_width_ =
std::max(max_accelerator_width_, menu->GetAcceleratorTextWidth());
« no previous file with comments | « views/controls/menu/menu_scroll_view_container.cc ('k') | views/controls/native_control.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698