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/views/widget/desktop_aura/desktop_stacking_client.h" | 5 #include "ui/views/widget/desktop_aura/desktop_stacking_client.h" |
6 | 6 |
7 #include "ui/aura/client/activation_client.h" | 7 #include "ui/aura/client/activation_client.h" |
8 #include "ui/aura/client/default_capture_client.h" | 8 #include "ui/aura/client/default_capture_client.h" |
9 #include "ui/aura/focus_manager.h" | 9 #include "ui/aura/focus_manager.h" |
10 #include "ui/aura/root_window.h" | 10 #include "ui/aura/root_window.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 aura::Window* DesktopStackingClient::GetDefaultParent(aura::Window* context, | 30 aura::Window* DesktopStackingClient::GetDefaultParent(aura::Window* context, |
31 aura::Window* window, | 31 aura::Window* window, |
32 const gfx::Rect& bounds) { | 32 const gfx::Rect& bounds) { |
33 if (!null_parent_.get()) | 33 if (!null_parent_.get()) |
34 CreateNULLParent(); | 34 CreateNULLParent(); |
35 | 35 |
36 return null_parent_.get(); | 36 return null_parent_.get(); |
37 } | 37 } |
38 | 38 |
39 void DesktopStackingClient::CreateNULLParent() { | 39 void DesktopStackingClient::CreateNULLParent() { |
40 focus_manager_.reset(new aura::FocusManager); | 40 focus_client_.reset(new aura::FocusManager); |
41 | 41 |
42 null_parent_.reset(new aura::RootWindow( | 42 null_parent_.reset(new aura::RootWindow( |
43 aura::RootWindow::CreateParams(gfx::Rect(100, 100)))); | 43 aura::RootWindow::CreateParams(gfx::Rect(100, 100)))); |
44 null_parent_->Init(); | 44 null_parent_->Init(); |
45 null_parent_->set_focus_manager(focus_manager_.get()); | 45 aura::client::SetFocusClient(null_parent_.get(), focus_client_.get()); |
46 | 46 |
47 activation_client_.reset(new DesktopActivationClient(null_parent_.get())); | 47 activation_client_.reset(new DesktopActivationClient(null_parent_.get())); |
48 | 48 |
49 window_event_filter_ = new corewm::CompoundEventFilter; | 49 window_event_filter_ = new corewm::CompoundEventFilter; |
50 null_parent_->SetEventFilter(window_event_filter_); | 50 null_parent_->SetEventFilter(window_event_filter_); |
51 | 51 |
52 input_method_filter_.reset(new corewm::InputMethodEventFilter); | 52 input_method_filter_.reset(new corewm::InputMethodEventFilter); |
53 input_method_filter_->SetInputMethodPropertyInRootWindow(null_parent_.get()); | 53 input_method_filter_->SetInputMethodPropertyInRootWindow(null_parent_.get()); |
54 window_event_filter_->AddHandler(input_method_filter_.get()); | 54 window_event_filter_->AddHandler(input_method_filter_.get()); |
55 | 55 |
56 capture_client_.reset( | 56 capture_client_.reset( |
57 new aura::client::DefaultCaptureClient(null_parent_.get())); | 57 new aura::client::DefaultCaptureClient(null_parent_.get())); |
58 } | 58 } |
59 | 59 |
60 } // namespace views | 60 } // namespace views |
OLD | NEW |