Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Side by Side Diff: ash/root_window_controller.cc

Issue 195793004: Implement overscroll support for the virtual keyboard. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix copyright notice. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 } 605 }
606 606
607 void RootWindowController::ActivateKeyboard( 607 void RootWindowController::ActivateKeyboard(
608 keyboard::KeyboardController* keyboard_controller) { 608 keyboard::KeyboardController* keyboard_controller) {
609 if (!keyboard::IsKeyboardEnabled() || 609 if (!keyboard::IsKeyboardEnabled() ||
610 GetContainer(kShellWindowId_VirtualKeyboardContainer)) { 610 GetContainer(kShellWindowId_VirtualKeyboardContainer)) {
611 return; 611 return;
612 } 612 }
613 DCHECK(keyboard_controller); 613 DCHECK(keyboard_controller);
614 if (!keyboard::IsKeyboardUsabilityExperimentEnabled()) { 614 if (!keyboard::IsKeyboardUsabilityExperimentEnabled()) {
615 aura::client::SetVirtualKeyboardClient(root_window(), keyboard_controller);
615 keyboard_controller->AddObserver(shelf()->shelf_layout_manager()); 616 keyboard_controller->AddObserver(shelf()->shelf_layout_manager());
616 keyboard_controller->AddObserver(panel_layout_manager_); 617 keyboard_controller->AddObserver(panel_layout_manager_);
617 keyboard_controller->AddObserver(docked_layout_manager_); 618 keyboard_controller->AddObserver(docked_layout_manager_);
618 } 619 }
619 aura::Window* parent = GetContainer( 620 aura::Window* parent = GetContainer(
620 kShellWindowId_VirtualKeyboardParentContainer); 621 kShellWindowId_VirtualKeyboardParentContainer);
621 DCHECK(parent); 622 DCHECK(parent);
622 aura::Window* keyboard_container = 623 aura::Window* keyboard_container =
623 keyboard_controller->GetContainerWindow(); 624 keyboard_controller->GetContainerWindow();
624 keyboard_container->set_id(kShellWindowId_VirtualKeyboardContainer); 625 keyboard_container->set_id(kShellWindowId_VirtualKeyboardContainer);
(...skipping 13 matching lines...) Expand all
638 keyboard_controller->GetContainerWindow(); 639 keyboard_controller->GetContainerWindow();
639 if (keyboard_container->GetRootWindow() == root_window()) { 640 if (keyboard_container->GetRootWindow() == root_window()) {
640 aura::Window* parent = GetContainer( 641 aura::Window* parent = GetContainer(
641 kShellWindowId_VirtualKeyboardParentContainer); 642 kShellWindowId_VirtualKeyboardParentContainer);
642 DCHECK(parent); 643 DCHECK(parent);
643 parent->RemoveChild(keyboard_container); 644 parent->RemoveChild(keyboard_container);
644 if (!keyboard::IsKeyboardUsabilityExperimentEnabled()) { 645 if (!keyboard::IsKeyboardUsabilityExperimentEnabled()) {
645 // Virtual keyboard may be deactivated while still showing, notify all 646 // Virtual keyboard may be deactivated while still showing, notify all
646 // observers that keyboard bounds changed to 0 before remove them. 647 // observers that keyboard bounds changed to 0 before remove them.
647 keyboard_controller->NotifyKeyboardBoundsChanging(gfx::Rect()); 648 keyboard_controller->NotifyKeyboardBoundsChanging(gfx::Rect());
649 aura::client::SetVirtualKeyboardClient(root_window(), NULL);
648 keyboard_controller->RemoveObserver(shelf()->shelf_layout_manager()); 650 keyboard_controller->RemoveObserver(shelf()->shelf_layout_manager());
649 keyboard_controller->RemoveObserver(panel_layout_manager_); 651 keyboard_controller->RemoveObserver(panel_layout_manager_);
650 keyboard_controller->RemoveObserver(docked_layout_manager_); 652 keyboard_controller->RemoveObserver(docked_layout_manager_);
651 } 653 }
652 } 654 }
653 } 655 }
654 656
655 //////////////////////////////////////////////////////////////////////////////// 657 ////////////////////////////////////////////////////////////////////////////////
656 // RootWindowController, private: 658 // RootWindowController, private:
657 659
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 DisableTouchHudProjection(); 1007 DisableTouchHudProjection();
1006 } 1008 }
1007 1009
1008 RootWindowController* GetRootWindowController( 1010 RootWindowController* GetRootWindowController(
1009 const aura::Window* root_window) { 1011 const aura::Window* root_window) {
1010 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; 1012 return root_window ? GetRootWindowSettings(root_window)->controller : NULL;
1011 } 1013 }
1012 1014
1013 } // namespace internal 1015 } // namespace internal
1014 } // namespace ash 1016 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/shelf/shelf_layout_manager.h » ('j') | ui/aura/client/virtual_keyboard_client.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698