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

Unified Diff: views/controls/tabbed_pane/native_tabbed_pane_win.cc

Issue 6452011: Rework tree APIs to reflect Google style and more const-correctness.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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
Index: views/controls/tabbed_pane/native_tabbed_pane_win.cc
===================================================================
--- views/controls/tabbed_pane/native_tabbed_pane_win.cc (revision 74231)
+++ views/controls/tabbed_pane/native_tabbed_pane_win.cc (working copy)
@@ -53,7 +53,7 @@
// Switches to the tab page identified by the given index.
void SwitchToPage(View* host, View* page) {
- for (int i = 0; i < host->GetChildViewCount(); ++i) {
+ for (int i = 0; i < host->child_count(); ++i) {
View* child = host->GetChildViewAt(i);
// The child might not have been laid out yet.
if (child == page)
@@ -64,8 +64,8 @@
FocusManager* focus_manager = page->GetFocusManager();
DCHECK(focus_manager);
View* focused_view = focus_manager->GetFocusedView();
- if (focused_view && host->IsParentOf(focused_view) &&
- !page->IsParentOf(focused_view))
+ if (focused_view && host->Contains(focused_view) &&
+ !page->Contains(focused_view))
focus_manager->SetFocusedView(page);
}
@@ -73,7 +73,7 @@
// LayoutManager overrides:
virtual void Layout(View* host) {
gfx::Rect bounds(host->GetContentsBounds());
- for (int i = 0; i < host->GetChildViewCount(); ++i) {
+ for (int i = 0; i < host->child_count(); ++i) {
View* child = host->GetChildViewAt(i);
// We only layout visible children, since it may be expensive.
if (child->IsVisible() && child->bounds() != bounds)
@@ -84,7 +84,7 @@
virtual gfx::Size GetPreferredSize(View* host) {
// First, query the preferred sizes to determine a good width.
int width = 0;
- for (int i = 0; i < host->GetChildViewCount(); ++i) {
+ for (int i = 0; i < host->child_count(); ++i) {
View* page = host->GetChildViewAt(i);
width = std::max(width, page->GetPreferredSize().width());
}
@@ -94,7 +94,7 @@
virtual int GetPreferredHeightForWidth(View* host, int width) {
int height = 0;
- for (int i = 0; i < host->GetChildViewCount(); ++i) {
+ for (int i = 0; i < host->child_count(); ++i) {
View* page = host->GetChildViewAt(i);
height = std::max(height, page->GetHeightForWidth(width));
}
« no previous file with comments | « views/controls/tabbed_pane/native_tabbed_pane_gtk.cc ('k') | views/controls/textfield/native_textfield_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698