| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 FillLayoutManager::SetAlwaysFill(kb_container); |
| 92 container_->AddChild(kb_container); | 92 container_->AddChild(kb_container); |
| 93 kb_container->Show(); | |
| 94 } | 93 } |
| 95 | 94 |
| 96 content::BrowserContext* browser_context_; | 95 content::BrowserContext* browser_context_; |
| 97 aura::Window* container_; | 96 aura::Window* container_; |
| 98 | 97 |
| 99 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardManagerImpl); | 98 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardManagerImpl); |
| 100 }; | 99 }; |
| 101 | 100 |
| 102 } // namespace | 101 } // namespace |
| 103 | 102 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 118 return instance; | 117 return instance; |
| 119 } | 118 } |
| 120 | 119 |
| 121 void VirtualKeyboardManager::Shutdown() { | 120 void VirtualKeyboardManager::Shutdown() { |
| 122 CHECK(instance); | 121 CHECK(instance); |
| 123 delete instance; | 122 delete instance; |
| 124 CHECK(!instance); | 123 CHECK(!instance); |
| 125 } | 124 } |
| 126 | 125 |
| 127 } // namespace athena | 126 } // namespace athena |
| OLD | NEW |