From 3a9c26f147ab16179197bd4460f4ec6c476afcf7 Mon Sep 17 00:00:00 2001 From: "oshima@chromium.org" Date: Fri, 12 Mar 2010 21:04:39 +0000 Subject: 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 --- views/view.cc | 6 ++++++ views/view.h | 3 +++ 2 files changed, 9 insertions(+) (limited to 'views') 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(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); -- cgit v1.1