OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/desktop/desktop_stacking_client.h" | 5 #include "ui/aura/desktop/desktop_stacking_client.h" |
6 | 6 |
7 #include "ui/aura/client/default_capture_client.h" | 7 #include "ui/aura/client/default_capture_client.h" |
8 #include "ui/aura/focus_manager.h" | 8 #include "ui/aura/focus_manager.h" |
9 #include "ui/aura/root_window.h" | 9 #include "ui/aura/root_window.h" |
10 #include "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
11 | 11 |
12 namespace aura { | 12 namespace aura { |
13 | 13 |
14 DesktopStackingClient::DesktopStackingClient() { | 14 DesktopStackingClient::DesktopStackingClient() { |
15 aura::client::SetStackingClient(this); | |
16 } | 15 } |
17 | 16 |
18 DesktopStackingClient::~DesktopStackingClient() { | 17 DesktopStackingClient::~DesktopStackingClient() { |
19 aura::client::SetStackingClient(NULL); | 18 aura::client::SetStackingClient(NULL); |
20 } | 19 } |
21 | 20 |
22 Window* DesktopStackingClient::GetDefaultParent(Window* window, | 21 Window* DesktopStackingClient::GetDefaultParent(Window* context, |
| 22 Window* window, |
23 const gfx::Rect& bounds) { | 23 const gfx::Rect& bounds) { |
24 if (!null_parent_.get()) { | 24 if (!null_parent_.get()) { |
25 null_parent_.reset(new aura::RootWindow( | 25 null_parent_.reset(new aura::RootWindow( |
26 aura::RootWindow::CreateParams(gfx::Rect(100, 100)))); | 26 aura::RootWindow::CreateParams(gfx::Rect(100, 100)))); |
27 null_parent_->Init(); | 27 null_parent_->Init(); |
28 null_parent_->set_focus_manager(new FocusManager); | 28 null_parent_->set_focus_manager(new FocusManager); |
29 | 29 |
30 capture_client_.reset( | 30 capture_client_.reset( |
31 new aura::client::DefaultCaptureClient(null_parent_.get())); | 31 new aura::client::DefaultCaptureClient(null_parent_.get())); |
32 } | 32 } |
33 return null_parent_.get(); | 33 return null_parent_.get(); |
34 } | 34 } |
35 | 35 |
36 } // namespace aura | 36 } // namespace aura |
OLD | NEW |