diff options
Diffstat (limited to 'ui/aura/window.cc')
-rw-r--r-- | ui/aura/window.cc | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/ui/aura/window.cc b/ui/aura/window.cc index 49be6e9..d1caa04 100644 --- a/ui/aura/window.cc +++ b/ui/aura/window.cc @@ -120,14 +120,6 @@ bool Window::IsActive() const { return aura::Desktop::GetInstance()->active_window() == this; } -ToplevelWindowContainer* Window::AsToplevelWindowContainer() { - return NULL; -} - -const ToplevelWindowContainer* Window::AsToplevelWindowContainer() const { - return NULL; -} - void Window::SetTransform(const ui::Transform& transform) { layer()->SetTransform(transform); } @@ -213,7 +205,7 @@ void Window::MoveChildAbove(Window* child, Window* other) { } bool Window::CanActivate() const { - return IsVisible() && delegate_ && delegate_->ShouldActivate(NULL); + return IsVisible() && (!delegate_ || delegate_->ShouldActivate(NULL)); } void Window::AddChild(Window* child) { @@ -387,14 +379,6 @@ bool Window::HasCapture() { return desktop && desktop->capture_window() == this; } -Window* Window::GetToplevelWindow() { - Window* window = this; - while (window && window->parent() && - !window->parent()->AsToplevelWindowContainer()) - window = window->parent(); - return window && window->parent() ? window : NULL; -} - void Window::SetProperty(const char* name, void* value) { void* old = GetProperty(name); if (value) |