summaryrefslogtreecommitdiffstats
path: root/ui/aura/toplevel_window_container.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ui/aura/toplevel_window_container.cc')
-rw-r--r--ui/aura/toplevel_window_container.cc21
1 files changed, 17 insertions, 4 deletions
diff --git a/ui/aura/toplevel_window_container.cc b/ui/aura/toplevel_window_container.cc
index e171d9e..eeb8f04 100644
--- a/ui/aura/toplevel_window_container.cc
+++ b/ui/aura/toplevel_window_container.cc
@@ -8,7 +8,6 @@
#include "ui/aura/toplevel_window_event_filter.h"
namespace aura {
-namespace internal {
ToplevelWindowContainer::ToplevelWindowContainer()
: Window(NULL) {
@@ -19,9 +18,23 @@ ToplevelWindowContainer::ToplevelWindowContainer()
ToplevelWindowContainer::~ToplevelWindowContainer() {
}
-bool ToplevelWindowContainer::IsToplevelWindowContainer() const {
- return true;
+Window* ToplevelWindowContainer::GetTopmostWindowToActivate(
+ Window* ignore) const {
+ for (Window::Windows::const_reverse_iterator i = children().rbegin();
+ i != children().rend(); ++i) {
+ Window* w = *i;
+ if (*i != ignore && (*i)->CanActivate())
+ return *i;
+ }
+ return NULL;
}
-} // namespace internal
+ToplevelWindowContainer* ToplevelWindowContainer::AsToplevelWindowContainer() {
+ return this;
+}
+
+const ToplevelWindowContainer*
+ ToplevelWindowContainer::AsToplevelWindowContainer() const {
+ return this;
+}
} // namespace aura