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