| 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 "ash/session_state_delegate.h" | 7 #include "ash/session_state_delegate.h" |
| 8 #include "ash/shelf/shelf_layout_manager.h" | 8 #include "ash/shelf/shelf_layout_manager.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
| (...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 ClickVirtualKeyboardInBlockedWindow) { | 614 ClickVirtualKeyboardInBlockedWindow) { |
| 615 aura::Window* root_window = Shell::GetPrimaryRootWindow(); | 615 aura::Window* root_window = Shell::GetPrimaryRootWindow(); |
| 616 aura::Window* keyboard_container = Shell::GetContainer(root_window, | 616 aura::Window* keyboard_container = Shell::GetContainer(root_window, |
| 617 internal::kShellWindowId_VirtualKeyboardContainer); | 617 internal::kShellWindowId_VirtualKeyboardContainer); |
| 618 ASSERT_TRUE(keyboard_container); | 618 ASSERT_TRUE(keyboard_container); |
| 619 keyboard_container->Show(); | 619 keyboard_container->Show(); |
| 620 | 620 |
| 621 aura::Window* keyboard_window = Shell::GetInstance()->keyboard_controller()-> | 621 aura::Window* keyboard_window = Shell::GetInstance()->keyboard_controller()-> |
| 622 proxy()->GetKeyboardWindow(); | 622 proxy()->GetKeyboardWindow(); |
| 623 keyboard_container->AddChild(keyboard_window); | 623 keyboard_container->AddChild(keyboard_window); |
| 624 keyboard_window->set_owned_by_parent(false); |
| 624 keyboard_window->SetBounds(gfx::Rect()); | 625 keyboard_window->SetBounds(gfx::Rect()); |
| 625 keyboard_window->Show(); | 626 keyboard_window->Show(); |
| 626 | 627 |
| 627 aura::test::TestEventHandler* handler = new aura::test::TestEventHandler; | 628 aura::test::TestEventHandler* handler = new aura::test::TestEventHandler; |
| 628 root_window->SetEventFilter(handler); | 629 root_window->SetEventFilter(handler); |
| 629 | 630 |
| 630 aura::test::EventGenerator event_generator(root_window, keyboard_window); | 631 aura::test::EventGenerator event_generator(root_window, keyboard_window); |
| 631 event_generator.ClickLeftButton(); | 632 event_generator.ClickLeftButton(); |
| 632 int expected_mouse_presses = 1; | 633 int expected_mouse_presses = 1; |
| 633 EXPECT_EQ(expected_mouse_presses, handler->num_mouse_events() / 2); | 634 EXPECT_EQ(expected_mouse_presses, handler->num_mouse_events() / 2); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 656 aura::WindowTracker tracker; | 657 aura::WindowTracker tracker; |
| 657 tracker.Add(keyboard_container); | 658 tracker.Add(keyboard_container); |
| 658 // Mock a login user profile change to reinitialize the keyboard. | 659 // Mock a login user profile change to reinitialize the keyboard. |
| 659 ash::Shell::GetInstance()->OnLoginUserProfilePrepared(); | 660 ash::Shell::GetInstance()->OnLoginUserProfilePrepared(); |
| 660 // keyboard_container should no longer be present. | 661 // keyboard_container should no longer be present. |
| 661 EXPECT_FALSE(tracker.Contains(keyboard_container)); | 662 EXPECT_FALSE(tracker.Contains(keyboard_container)); |
| 662 } | 663 } |
| 663 | 664 |
| 664 } // namespace test | 665 } // namespace test |
| 665 } // namespace ash | 666 } // namespace ash |
| OLD | NEW |