OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/root_window_controller.h" | 5 #include "ash/root_window_controller.h" |
6 | 6 |
7 #include <queue> | 7 #include <queue> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/ash_constants.h" | 10 #include "ash/ash_constants.h" |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
513 GetContainer(kShellWindowId_DefaultContainer)->children(); | 513 GetContainer(kShellWindowId_DefaultContainer)->children(); |
514 for (aura::Window::Windows::const_reverse_iterator iter = windows.rbegin(); | 514 for (aura::Window::Windows::const_reverse_iterator iter = windows.rbegin(); |
515 iter != windows.rend(); ++iter) { | 515 iter != windows.rend(); ++iter) { |
516 if (wm::GetWindowState(*iter)->IsFullscreen()) | 516 if (wm::GetWindowState(*iter)->IsFullscreen()) |
517 return *iter; | 517 return *iter; |
518 } | 518 } |
519 return NULL; | 519 return NULL; |
520 } | 520 } |
521 | 521 |
522 void RootWindowController::InitKeyboard() { | 522 void RootWindowController::InitKeyboard() { |
523 if (keyboard::IsKeyboardEnabled()) { | 523 aura::Window* parent = root_window(); |
524 aura::Window* parent = root_window(); | 524 // Restricts virtual keyboard to primary root window. |
525 | 525 if (keyboard::IsKeyboardEnabled() && |
526 Shell::GetPrimaryRootWindow() == parent) { | |
526 keyboard::KeyboardControllerProxy* proxy = | 527 keyboard::KeyboardControllerProxy* proxy = |
527 Shell::GetInstance()->delegate()->CreateKeyboardControllerProxy(); | 528 Shell::GetInstance()->delegate()->CreateKeyboardControllerProxy(); |
528 keyboard_controller_.reset( | 529 keyboard_controller_.reset( |
oshima
2013/09/28 04:37:27
If there should be only one KeyboardCOntroller, sh
bshe
2013/09/30 18:20:50
+sadrul
I am happy to do the suggested change. Bu
sadrul
2013/09/30 18:31:50
Yeah, if we decide to show the keyboard just on th
| |
529 new keyboard::KeyboardController(proxy)); | 530 new keyboard::KeyboardController(proxy)); |
530 | 531 |
531 keyboard_controller_->AddObserver(shelf()->shelf_layout_manager()); | 532 keyboard_controller_->AddObserver(shelf()->shelf_layout_manager()); |
532 keyboard_controller_->AddObserver(panel_layout_manager_); | 533 keyboard_controller_->AddObserver(panel_layout_manager_); |
533 | 534 |
534 aura::Window* keyboard_container = | 535 aura::Window* keyboard_container = |
535 keyboard_controller_->GetContainerWindow(); | 536 keyboard_controller_->GetContainerWindow(); |
536 keyboard_container->set_id(kShellWindowId_VirtualKeyboardContainer); | 537 keyboard_container->set_id(kShellWindowId_VirtualKeyboardContainer); |
537 parent->AddChild(keyboard_container); | 538 parent->AddChild(keyboard_container); |
538 keyboard_container->SetBounds(parent->bounds()); | 539 keyboard_container->SetBounds(parent->bounds()); |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
824 DisableTouchHudProjection(); | 825 DisableTouchHudProjection(); |
825 } | 826 } |
826 | 827 |
827 RootWindowController* GetRootWindowController( | 828 RootWindowController* GetRootWindowController( |
828 const aura::RootWindow* root_window) { | 829 const aura::RootWindow* root_window) { |
829 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; | 830 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; |
830 } | 831 } |
831 | 832 |
832 } // namespace internal | 833 } // namespace internal |
833 } // namespace ash | 834 } // namespace ash |
OLD | NEW |