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

Unified Diff: chrome/browser/chromeos/notifications/notification_panel.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
Index: chrome/browser/chromeos/notifications/notification_panel.cc
===================================================================
--- chrome/browser/chromeos/notifications/notification_panel.cc (revision 92600)
+++ chrome/browser/chromeos/notifications/notification_panel.cc (working copy)
@@ -154,7 +154,7 @@
// Layout bottom up
int height = 0;
for (int i = child_count() - 1; i >= 0; --i) {
- views::View* child = GetChildViewAt(i);
+ views::View* child = child_at(i);
child->SetBounds(0, height, child->width(), child->height());
height += child->height() + margin_;
}
@@ -166,7 +166,7 @@
int height = 0;
int max_width = 0;
for (int i = child_count() - 1; i >= 0; --i) {
- views::View* child = GetChildViewAt(i);
+ views::View* child = child_at(i);
height += child->height() + margin_;
max_width = std::max(max_width, child->width());
}
@@ -181,8 +181,7 @@
gfx::Rect GetNewBounds() {
gfx::Rect rect;
for (int i = child_count() - 1; i >= 0; --i) {
- BalloonViewImpl* view =
- static_cast<BalloonViewImpl*>(GetChildViewAt(i));
+ BalloonViewImpl* view = static_cast<BalloonViewImpl*>(child_at(i));
if (!view->stale()) {
if (rect.IsEmpty()) {
rect = view->bounds();
@@ -198,8 +197,7 @@
int GetNewCount() {
int count = 0;
for (int i = child_count() - 1; i >= 0; --i) {
- BalloonViewImpl* view =
- static_cast<BalloonViewImpl*>(GetChildViewAt(i));
+ BalloonViewImpl* view = static_cast<BalloonViewImpl*>(child_at(i));
if (!view->stale())
count++;
}
@@ -209,24 +207,21 @@
// Make all notifications stale.
void MakeAllStale() {
for (int i = child_count() - 1; i >= 0; --i) {
- BalloonViewImpl* view =
- static_cast<BalloonViewImpl*>(GetChildViewAt(i));
+ BalloonViewImpl* view = static_cast<BalloonViewImpl*>(child_at(i));
view->set_stale();
}
}
void DismissAll() {
for (int i = child_count() - 1; i >= 0; --i) {
- BalloonViewImpl* view =
- static_cast<BalloonViewImpl*>(GetChildViewAt(i));
+ BalloonViewImpl* view = static_cast<BalloonViewImpl*>(child_at(i));
view->Close(true);
}
}
BalloonViewImpl* FindBalloonView(const Notification& notification) {
for (int i = child_count() - 1; i >= 0; --i) {
- BalloonViewImpl* view =
- static_cast<BalloonViewImpl*>(GetChildViewAt(i));
+ BalloonViewImpl* view = static_cast<BalloonViewImpl*>(child_at(i));
if (view->IsFor(notification)) {
return view;
}
@@ -238,7 +233,7 @@
gfx::Point copy(point);
ConvertPointFromWidget(this, &copy);
for (int i = child_count() - 1; i >= 0; --i) {
- views::View* view = GetChildViewAt(i);
+ views::View* view = child_at(i);
if (view->bounds().Contains(copy))
return static_cast<BalloonViewImpl*>(view);
}
« no previous file with comments | « chrome/browser/chromeos/notifications/balloon_view.cc ('k') | chrome/browser/chromeos/status/status_area_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698