| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ui/aura/test_desktop_delegate.h" |
| 6 |
| 7 #include "ui/aura/desktop.h" |
| 8 |
| 9 namespace aura { |
| 10 |
| 11 TestDesktopDelegate::TestDesktopDelegate() |
| 12 : default_container_(new ToplevelWindowContainer) { |
| 13 Desktop::GetInstance()->set_delegate(this); |
| 14 default_container_->Init(); |
| 15 default_container_->SetBounds( |
| 16 gfx::Rect(gfx::Point(), Desktop::GetInstance()->GetSize())); |
| 17 Desktop::GetInstance()->window()->AddChild(default_container_.get()); |
| 18 default_container_->Show(); |
| 19 } |
| 20 |
| 21 TestDesktopDelegate::~TestDesktopDelegate() { |
| 22 } |
| 23 |
| 24 |
| 25 void TestDesktopDelegate::AddChildToDefaultParent(Window* window) { |
| 26 default_container_->AddChild(window); |
| 27 } |
| 28 |
| 29 Window* TestDesktopDelegate::GetTopmostWindowToActivate(Window* ignore) const { |
| 30 return default_container_->GetTopmostWindowToActivate(ignore); |
| 31 } |
| 32 |
| 33 } // namespace aura |
| OLD | NEW |