| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "athena/virtual_keyboard/public/virtual_keyboard_manager.h" | 5 #include "athena/virtual_keyboard/public/virtual_keyboard_manager.h" |
| 6 | 6 |
| 7 #include "athena/screen/public/screen_manager.h" | 7 #include "athena/screen/public/screen_manager.h" |
| 8 #include "athena/util/container_priorities.h" | 8 #include "athena/util/container_priorities.h" |
| 9 #include "athena/util/fill_layout_manager.h" | 9 #include "athena/util/fill_layout_manager.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 CP_VIRTUAL_KEYBOARD); | 81 CP_VIRTUAL_KEYBOARD); |
| 82 container_ = athena::ScreenManager::Get()->CreateContainer(params); | 82 container_ = athena::ScreenManager::Get()->CreateContainer(params); |
| 83 container_->SetLayoutManager(new FillLayoutManager(container_)); | 83 container_->SetLayoutManager(new FillLayoutManager(container_)); |
| 84 | 84 |
| 85 keyboard::KeyboardController* controller = new keyboard::KeyboardController( | 85 keyboard::KeyboardController* controller = new keyboard::KeyboardController( |
| 86 new BasicKeyboardControllerProxy(browser_context_, | 86 new BasicKeyboardControllerProxy(browser_context_, |
| 87 container_->GetRootWindow())); | 87 container_->GetRootWindow())); |
| 88 // ResetInstance takes ownership. | 88 // ResetInstance takes ownership. |
| 89 keyboard::KeyboardController::ResetInstance(controller); | 89 keyboard::KeyboardController::ResetInstance(controller); |
| 90 aura::Window* kb_container = controller->GetContainerWindow(); | 90 aura::Window* kb_container = controller->GetContainerWindow(); |
| 91 FillLayoutManager::SetAlwaysFill(kb_container); |
| 91 container_->AddChild(kb_container); | 92 container_->AddChild(kb_container); |
| 92 kb_container->Show(); | 93 kb_container->Show(); |
| 93 } | 94 } |
| 94 | 95 |
| 95 content::BrowserContext* browser_context_; | 96 content::BrowserContext* browser_context_; |
| 96 aura::Window* container_; | 97 aura::Window* container_; |
| 97 | 98 |
| 98 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardManagerImpl); | 99 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardManagerImpl); |
| 99 }; | 100 }; |
| 100 | 101 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 117 return instance; | 118 return instance; |
| 118 } | 119 } |
| 119 | 120 |
| 120 void VirtualKeyboardManager::Shutdown() { | 121 void VirtualKeyboardManager::Shutdown() { |
| 121 CHECK(instance); | 122 CHECK(instance); |
| 122 delete instance; | 123 delete instance; |
| 123 CHECK(!instance); | 124 CHECK(!instance); |
| 124 } | 125 } |
| 125 | 126 |
| 126 } // namespace athena | 127 } // namespace athena |
| OLD | NEW |