Chromium Code Reviews| Index: content/shell/shell_stacking_client_ash.cc |
| diff --git a/content/shell/shell_stacking_client_ash.cc b/content/shell/shell_stacking_client_ash.cc |
| index f9e7c0a644f2fa8a7ce9fd96f1db654d9e700e27..8d6b80b3576dabf27939d1e19fd66464c06070c6 100644 |
| --- a/content/shell/shell_stacking_client_ash.cc |
| +++ b/content/shell/shell_stacking_client_ash.cc |
| @@ -13,7 +13,8 @@ |
| namespace content { |
| -ShellStackingClientAsh::ShellStackingClientAsh() { |
| +ShellStackingClientAsh::ShellStackingClientAsh(aura::RootWindow* root_window) |
| + : root_window_(root_window){ |
| } |
| ShellStackingClientAsh::~ShellStackingClientAsh() { |
| @@ -27,29 +28,33 @@ aura::Window* ShellStackingClientAsh::GetDefaultParent( |
| aura::Window* context, |
| aura::Window* window, |
| const gfx::Rect& bounds) { |
| - if (!root_window_.get()) { |
| - root_window_.reset(new aura::RootWindow( |
| - aura::RootWindow::CreateParams(gfx::Rect(100, 100)))); |
| - root_window_->Init(); |
| + if (!focus_client_.get()) { |
|
sky
2013/01/15 21:53:49
Can we instead have an Init() method that does thi
Nayan
2013/01/15 23:39:03
Done.
|
| focus_client_.reset(new aura::FocusManager); |
| aura::client::SetFocusClient(root_window_.get(), focus_client_.get()); |
| + } |
| + if (!input_method_filter_.get()) { |
| root_window_event_filter_ = new views::corewm::CompoundEventFilter; |
| // Pass ownership of the filter to the root_window. |
| root_window_->SetEventFilter(root_window_event_filter_); |
| input_method_filter_.reset(new views::corewm::InputMethodEventFilter( |
| - root_window_->GetAcceleratedWidget())); |
| + root_window_->GetAcceleratedWidget())); |
| input_method_filter_->SetInputMethodPropertyInRootWindow( |
| root_window_.get()); |
| root_window_event_filter_->AddHandler(input_method_filter_.get()); |
| + } |
| + if (!test_activation_client_.get()) { |
| test_activation_client_.reset( |
| new aura::test::TestActivationClient(root_window_.get())); |
| + } |
| + if (!capture_client_.get()) { |
| capture_client_.reset( |
| new aura::client::DefaultCaptureClient(root_window_.get())); |
| } |
| + |
| return root_window_.get(); |
| } |