| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "ash/display/virtual_keyboard_window_controller.h" | 5 #include "ash/display/virtual_keyboard_window_controller.h" |
| 6 | 6 |
| 7 #include "ash/display/display_controller.h" | 7 #include "ash/display/display_controller.h" |
| 8 #include "ash/display/display_info.h" | 8 #include "ash/display/display_info.h" |
| 9 #include "ash/display/display_manager.h" | 9 #include "ash/display/display_manager.h" |
| 10 #include "ash/host/root_window_host_factory.h" | 10 #include "ash/host/root_window_host_factory.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 // No need to remove RootWindowObserver because | 45 // No need to remove RootWindowObserver because |
| 46 // the DisplayController object outlives RootWindow objects. | 46 // the DisplayController object outlives RootWindow objects. |
| 47 root_window->AddRootWindowObserver( | 47 root_window->AddRootWindowObserver( |
| 48 Shell::GetInstance()->display_controller()); | 48 Shell::GetInstance()->display_controller()); |
| 49 InitRootWindowSettings(root_window->window())->display_id = | 49 InitRootWindowSettings(root_window->window())->display_id = |
| 50 display_info.id(); | 50 display_info.id(); |
| 51 root_window->Init(); | 51 root_window->Init(); |
| 52 RootWindowController::CreateForVirtualKeyboardDisplay(root_window); | 52 RootWindowController::CreateForVirtualKeyboardDisplay(root_window); |
| 53 root_window_controller_.reset(GetRootWindowController( | 53 root_window_controller_.reset(GetRootWindowController( |
| 54 root_window->window())); | 54 root_window->window())); |
| 55 root_window_controller_->dispatcher()->ShowRootWindow(); | 55 root_window_controller_->dispatcher()->host()->Show(); |
| 56 } else { | 56 } else { |
| 57 aura::RootWindow* root_window = root_window_controller_->dispatcher(); | 57 aura::RootWindow* root_window = root_window_controller_->dispatcher(); |
| 58 GetRootWindowSettings(root_window->window())->display_id = | 58 GetRootWindowSettings(root_window->window())->display_id = |
| 59 display_info.id(); | 59 display_info.id(); |
| 60 root_window->SetHostBounds(display_info.bounds_in_native()); | 60 root_window->SetHostBounds(display_info.bounds_in_native()); |
| 61 } | 61 } |
| 62 } | 62 } |
| 63 | 63 |
| 64 void VirtualKeyboardWindowController::Close() { | 64 void VirtualKeyboardWindowController::Close() { |
| 65 if (root_window_controller_.get()) { | 65 if (root_window_controller_.get()) { |
| 66 root_window_controller_->dispatcher()->RemoveRootWindowObserver( | 66 root_window_controller_->dispatcher()->RemoveRootWindowObserver( |
| 67 Shell::GetInstance()->display_controller()); | 67 Shell::GetInstance()->display_controller()); |
| 68 root_window_controller_->Shutdown(); | 68 root_window_controller_->Shutdown(); |
| 69 root_window_controller_.reset(); | 69 root_window_controller_.reset(); |
| 70 } | 70 } |
| 71 } | 71 } |
| 72 | 72 |
| 73 } // namespace internal | 73 } // namespace internal |
| 74 } // namespace ash | 74 } // namespace ash |
| OLD | NEW |