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

Unified Diff: ui/aura/toplevel_window_container.cc

Issue 8194004: change the way windows are parented when their parent is set to NULL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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: ui/aura/toplevel_window_container.cc
===================================================================
--- ui/aura/toplevel_window_container.cc (revision 104542)
+++ ui/aura/toplevel_window_container.cc (working copy)
@@ -8,7 +8,6 @@
#include "ui/aura/toplevel_window_event_filter.h"
namespace aura {
-namespace internal {
ToplevelWindowContainer::ToplevelWindowContainer()
: Window(NULL) {
@@ -19,9 +18,22 @@
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) {
+ 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

Powered by Google App Engine
This is Rietveld 408576698