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

Unified Diff: chrome/browser/ui/views/options/cookies_view.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: chrome/browser/ui/views/options/cookies_view.cc
===================================================================
--- chrome/browser/ui/views/options/cookies_view.cc (revision 74231)
+++ chrome/browser/ui/views/options/cookies_view.cc (working copy)
@@ -73,13 +73,12 @@
class CookiesView::InfoPanelView : public views::View {
public:
virtual void Layout() {
- int child_count = GetChildViewCount();
- for (int i = 0; i < child_count; ++i)
+ for (int i = 0; i < child_count(); ++i)
GetChildViewAt(i)->SetBounds(0, 0, width(), height());
}
virtual gfx::Size GetPreferredSize() {
- DCHECK(GetChildViewCount() > 0);
+ DCHECK(has_children());
return GetChildViewAt(0)->GetPreferredSize();
}
};
@@ -177,7 +176,7 @@
void CookiesView::Layout() {
// Lay out the Remove/Remove All buttons in the parent view.
gfx::Size ps = remove_button_->GetPreferredSize();
- gfx::Rect parent_bounds = GetParent()->GetContentsBounds();
+ gfx::Rect parent_bounds = parent()->GetContentsBounds();
int y_buttons =
parent_bounds.bottom() - ps.height() - views::kButtonVEdgeMargin;
@@ -362,9 +361,8 @@
layout->AddView(info_panel_);
// Add the Remove/Remove All buttons to the ClientView
- View* parent = GetParent();
- parent->AddChildView(remove_button_);
- parent->AddChildView(remove_all_button_);
+ parent()->AddChildView(remove_button_);
+ parent()->AddChildView(remove_all_button_);
if (!cookies_tree_model_.get()->GetRoot()->GetChildCount()) {
UpdateForEmptyState();
} else {
« no previous file with comments | « chrome/browser/ui/views/options/content_settings_window_view.cc ('k') | chrome/browser/ui/views/options/exceptions_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698