| 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/display/root_window_transformers.h" | 10 #include "ash/display/root_window_transformers.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 // No need to remove WindowTreeHostObserver because the DisplayController | 53 // No need to remove WindowTreeHostObserver because the DisplayController |
| 54 // outlives the host. | 54 // outlives the host. |
| 55 host->AddObserver(Shell::GetInstance()->display_controller()); | 55 host->AddObserver(Shell::GetInstance()->display_controller()); |
| 56 InitRootWindowSettings(host->window())->display_id = display_info.id(); | 56 InitRootWindowSettings(host->window())->display_id = display_info.id(); |
| 57 host->InitHost(); | 57 host->InitHost(); |
| 58 RootWindowController::CreateForVirtualKeyboardDisplay(host); | 58 RootWindowController::CreateForVirtualKeyboardDisplay(host); |
| 59 root_window_controller_.reset(GetRootWindowController(host->window())); | 59 root_window_controller_.reset(GetRootWindowController(host->window())); |
| 60 root_window_controller_->host()->Show(); | 60 root_window_controller_->host()->Show(); |
| 61 root_window_controller_->ActivateKeyboard( | 61 root_window_controller_->ActivateKeyboard( |
| 62 Shell::GetInstance()->keyboard_controller()); | 62 keyboard::KeyboardController::GetInstance()); |
| 63 FlipDisplay(); | 63 FlipDisplay(); |
| 64 } else { | 64 } else { |
| 65 aura::WindowTreeHost* host = root_window_controller_->host(); | 65 aura::WindowTreeHost* host = root_window_controller_->host(); |
| 66 GetRootWindowSettings(host->window())->display_id = display_info.id(); | 66 GetRootWindowSettings(host->window())->display_id = display_info.id(); |
| 67 host->SetBounds(display_info.bounds_in_native()); | 67 host->SetBounds(display_info.bounds_in_native()); |
| 68 } | 68 } |
| 69 } | 69 } |
| 70 | 70 |
| 71 void VirtualKeyboardWindowController::Close() { | 71 void VirtualKeyboardWindowController::Close() { |
| 72 if (root_window_controller_.get()) { | 72 if (root_window_controller_.get()) { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 99 Shell::GetInstance()->CreateKeyboard(); | 99 Shell::GetInstance()->CreateKeyboard(); |
| 100 } | 100 } |
| 101 | 101 |
| 102 void VirtualKeyboardWindowController::OnMaximizeModeEnded() { | 102 void VirtualKeyboardWindowController::OnMaximizeModeEnded() { |
| 103 keyboard::SetTouchKeyboardEnabled(false); | 103 keyboard::SetTouchKeyboardEnabled(false); |
| 104 if (!keyboard::IsKeyboardEnabled()) | 104 if (!keyboard::IsKeyboardEnabled()) |
| 105 Shell::GetInstance()->DeactivateKeyboard(); | 105 Shell::GetInstance()->DeactivateKeyboard(); |
| 106 } | 106 } |
| 107 | 107 |
| 108 } // namespace ash | 108 } // namespace ash |
| OLD | NEW |