summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-12 21:04:39 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-12 21:04:39 +0000
commit3a9c26f147ab16179197bd4460f4ec6c476afcf7 (patch)
treeaa850e93e76b3549550ae5d4d1e2bccbd07083b1 /views
parente512583b79e366db399a6566964412bb6e5af823 (diff)
downloadchromium_src-3a9c26f147ab16179197bd4460f4ec6c476afcf7.zip
chromium_src-3a9c26f147ab16179197bd4460f4ec6c476afcf7.tar.gz
chromium_src-3a9c26f147ab16179197bd4460f4ec6c476afcf7.tar.bz2
Autoslide/hide notifications after timeout.
* Introduced panel's state to manage which notifications will be shown.' * Added "OnPanelStateChanged" to PanelController::Delegate method to monitor the panel's state. * Removed unnecessary SetSize in BalloonViewImpl. The size is set in BalloonViewImpl::Layout. BUG=33306 TEST=This requires chromeos's wm and system notification to test (which does not exit yet). None for now but I am writing unittest now. Review URL: http://codereview.chromium.org/874004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41484 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/view.cc6
-rw-r--r--views/view.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/views/view.cc b/views/view.cc
index c04a4df7..437b3b7 100644
--- a/views/view.cc
+++ b/views/view.cc
@@ -556,6 +556,12 @@ int View::GetChildViewCount() const {
return static_cast<int>(child_views_.size());
}
+bool View::HasChildView(View* a_view) {
+ return find(child_views_.begin(),
+ child_views_.end(),
+ a_view) != child_views_.end();
+}
+
void View::RemoveChildView(View* a_view) {
DoRemoveChildView(a_view, true, true, false);
}
diff --git a/views/view.h b/views/view.h
index d493a0b..0dcc734 100644
--- a/views/view.h
+++ b/views/view.h
@@ -435,6 +435,9 @@ class View : public AcceleratorTarget {
// Get the number of child Views.
int GetChildViewCount() const;
+ // Tests if this view has a given view as direct child.
+ bool HasChildView(View* a_view);
+
// Returns the deepest descendant that contains the specified point.
virtual View* GetViewForPoint(const gfx::Point& point);