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