Chromium Code Reviews| Index: ui/aura/test_desktop_delegate.cc |
| =================================================================== |
| --- ui/aura/test_desktop_delegate.cc (revision 0) |
| +++ ui/aura/test_desktop_delegate.cc (revision 0) |
| @@ -0,0 +1,33 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "ui/aura/test_desktop_delegate.h" |
| + |
| +#include "ui/aura/desktop.h" |
| + |
| +namespace aura { |
| + |
| +TestDesktopDelegate::TestDesktopDelegate() |
| + : default_container_(new ToplevelWindowContainer) { |
| + Desktop::GetInstance()->set_delegate(this); |
|
sky
2011/10/07 19:59:45
Unset in the destructor?
|
| + default_container_->Init(); |
| + default_container_->SetBounds( |
| + gfx::Rect(gfx::Point(), Desktop::GetInstance()->GetSize())); |
| + Desktop::GetInstance()->window()->AddChild(default_container_.get()); |
| + default_container_->Show(); |
| +} |
| + |
| +TestDesktopDelegate::~TestDesktopDelegate() { |
| +} |
| + |
| + |
|
sky
2011/10/07 19:59:45
nit: remove one of these.
|
| +void TestDesktopDelegate::AddChildToDefaultParent(Window* window) { |
| + default_container_->AddChild(window); |
| +} |
| + |
| +Window* TestDesktopDelegate::GetTopmostWindowToActivate(Window* ignore) const { |
| + return default_container_->GetTopmostWindowToActivate(ignore); |
| +} |
| + |
| +} // namespace aura |
| Property changes on: ui\aura\test_desktop_delegate.cc |
| ___________________________________________________________________ |
| Added: svn:eol-style |
| + LF |