summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-03 18:36:47 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-03 18:36:47 +0000
commitbcd6cf7b2d813be66486a4b71345deb4050453c1 (patch)
tree91bb3564b9aed3dca4061398def6037982749d13
parent301f973d3a2111bc255828cf71b961fb96c0bf5c (diff)
downloadchromium_src-bcd6cf7b2d813be66486a4b71345deb4050453c1.zip
chromium_src-bcd6cf7b2d813be66486a4b71345deb4050453c1.tar.gz
chromium_src-bcd6cf7b2d813be66486a4b71345deb4050453c1.tar.bz2
views: Use ViewVector typedef instead of std::vector<View*> in view.*
BUG=72040,68682 TEST=None R=sky@chromium.org Review URL: http://codereview.chromium.org/7111008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87823 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--views/view.cc8
-rw-r--r--views/view.h5
2 files changed, 7 insertions, 6 deletions
diff --git a/views/view.cc b/views/view.cc
index 2c36cc7..039c70c 100644
--- a/views/view.cc
+++ b/views/view.cc
@@ -566,7 +566,7 @@ bool View::IsGroupFocusTraversable() const {
return true;
}
-void View::GetViewsWithGroup(int group_id, std::vector<View*>* out) {
+void View::GetViewsWithGroup(int group_id, ViewVector* out) {
if (group_ == group_id)
out->push_back(this);
@@ -575,7 +575,7 @@ void View::GetViewsWithGroup(int group_id, std::vector<View*>* out) {
}
View* View::GetSelectedViewForGroup(int group_id) {
- std::vector<View*> views;
+ ViewVector views;
GetWidget()->GetRootView()->GetViewsWithGroup(group_id, &views);
return views.empty() ? NULL : views[0];
}
@@ -1463,7 +1463,7 @@ void View::BoundsChanged(const gfx::Rect& previous_bounds) {
// Notify interested Views that visible bounds within the root view may have
// changed.
if (descendants_to_notify_.get()) {
- for (std::vector<View*>::iterator i = descendants_to_notify_->begin();
+ for (ViewVector::iterator i = descendants_to_notify_->begin();
i != descendants_to_notify_->end(); ++i) {
(*i)->OnVisibleBoundsChanged();
}
@@ -1744,7 +1744,7 @@ void View::InitFocusSiblings(View* v, int index) {
// the last focusable element. Let's try to find an element with no next
// focusable element to link to.
View* last_focusable_view = NULL;
- for (std::vector<View*>::iterator iter = children_.begin();
+ for (ViewVector::iterator iter = children_.begin();
iter != children_.end(); ++iter) {
if (!(*iter)->next_focusable_view_) {
last_focusable_view = *iter;
diff --git a/views/view.h b/views/view.h
index 27aed3a..d60fa43 100644
--- a/views/view.h
+++ b/views/view.h
@@ -143,6 +143,8 @@ class DragController {
/////////////////////////////////////////////////////////////////////////////
class View : public AcceleratorTarget {
public:
+ typedef std::vector<View*> ViewVector;
+
#if defined(TOUCH_UI)
enum TouchStatus {
TOUCH_STATUS_UNKNOWN = 0, // Unknown touch status. This is used to indicate
@@ -450,7 +452,7 @@ class View : public AcceleratorTarget {
// Fills the provided vector with all the available views which belong to the
// provided group.
- void GetViewsWithGroup(int group_id, std::vector<View*>* out);
+ void GetViewsWithGroup(int group_id, ViewVector* out);
// Return the View that is currently selected in the specified group.
// The default implementation simply returns the first View found for that
@@ -1314,7 +1316,6 @@ class View : public AcceleratorTarget {
View* parent_;
// This view's children.
- typedef std::vector<View*> ViewVector;
ViewVector children_;
// Size and disposition ------------------------------------------------------