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

Side by Side Diff: ash/shell.cc

Issue 34783006: Add --keyboard-usability-test flag and always show keyboard unless manually hide (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 7 years, 2 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/shell.h" 5 #include "ash/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "ash/accelerators/accelerator_controller.h" 10 #include "ash/accelerators/accelerator_controller.h"
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 } 330 }
331 FOR_EACH_OBSERVER(ShellObserver, observers_, 331 FOR_EACH_OBSERVER(ShellObserver, observers_,
332 OnDisplayWorkAreaInsetsChanged()); 332 OnDisplayWorkAreaInsetsChanged());
333 } 333 }
334 334
335 void Shell::OnLoginStateChanged(user::LoginStatus status) { 335 void Shell::OnLoginStateChanged(user::LoginStatus status) {
336 if (status != user::LOGGED_IN_NONE) { 336 if (status != user::LOGGED_IN_NONE) {
337 // TODO(bshe): Primary root window controller may not be the controller to 337 // TODO(bshe): Primary root window controller may not be the controller to
338 // attach virtual keyboard. See http://crbug.com/303429 338 // attach virtual keyboard. See http://crbug.com/303429
339 InitKeyboard(GetPrimaryRootWindowController()); 339 InitKeyboard(GetPrimaryRootWindowController());
340 GetPrimaryRootWindowController()->ActivateKeyboard(
341 keyboard_controller_.get());
340 } 342 }
341 FOR_EACH_OBSERVER(ShellObserver, observers_, OnLoginStateChanged(status)); 343 FOR_EACH_OBSERVER(ShellObserver, observers_, OnLoginStateChanged(status));
342 } 344 }
343 345
344 void Shell::UpdateAfterLoginStatusChange(user::LoginStatus status) { 346 void Shell::UpdateAfterLoginStatusChange(user::LoginStatus status) {
345 RootWindowControllerList controllers = GetAllRootWindowControllers(); 347 RootWindowControllerList controllers = GetAllRootWindowControllers();
346 for (RootWindowControllerList::iterator iter = controllers.begin(); 348 for (RootWindowControllerList::iterator iter = controllers.begin();
347 iter != controllers.end(); ++iter) 349 iter != controllers.end(); ++iter)
348 (*iter)->UpdateAfterLoginStatusChange(status); 350 (*iter)->UpdateAfterLoginStatusChange(status);
349 } 351 }
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 RootWindowControllerList controllers = GetAllRootWindowControllers(); 905 RootWindowControllerList controllers = GetAllRootWindowControllers();
904 for (RootWindowControllerList::iterator iter = controllers.begin(); 906 for (RootWindowControllerList::iterator iter = controllers.begin();
905 iter != controllers.end(); ++iter) { 907 iter != controllers.end(); ++iter) {
906 (*iter)->DeactivateKeyboard(keyboard_controller_.get()); 908 (*iter)->DeactivateKeyboard(keyboard_controller_.get());
907 } 909 }
908 } 910 }
909 keyboard::KeyboardControllerProxy* proxy = 911 keyboard::KeyboardControllerProxy* proxy =
910 delegate_->CreateKeyboardControllerProxy(); 912 delegate_->CreateKeyboardControllerProxy();
911 keyboard_controller_.reset( 913 keyboard_controller_.reset(
912 new keyboard::KeyboardController(proxy)); 914 new keyboard::KeyboardController(proxy));
913 root->ActivateKeyboard(keyboard_controller_.get());
914 } 915 }
915 } 916 }
916 917
917 void Shell::InitRootWindow(aura::RootWindow* root_window) { 918 void Shell::InitRootWindow(aura::RootWindow* root_window) {
918 DCHECK(activation_client_); 919 DCHECK(activation_client_);
919 DCHECK(visibility_controller_.get()); 920 DCHECK(visibility_controller_.get());
920 DCHECK(drag_drop_controller_.get()); 921 DCHECK(drag_drop_controller_.get());
921 DCHECK(window_cycle_controller_.get()); 922 DCHECK(window_cycle_controller_.get());
922 923
923 aura::client::SetFocusClient(root_window, focus_client_.get()); 924 aura::client::SetFocusClient(root_window, focus_client_.get());
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 //////////////////////////////////////////////////////////////////////////////// 972 ////////////////////////////////////////////////////////////////////////////////
972 // Shell, aura::client::ActivationChangeObserver implementation: 973 // Shell, aura::client::ActivationChangeObserver implementation:
973 974
974 void Shell::OnWindowActivated(aura::Window* gained_active, 975 void Shell::OnWindowActivated(aura::Window* gained_active,
975 aura::Window* lost_active) { 976 aura::Window* lost_active) {
976 if (gained_active) 977 if (gained_active)
977 target_root_window_ = gained_active->GetRootWindow(); 978 target_root_window_ = gained_active->GetRootWindow();
978 } 979 }
979 980
980 } // namespace ash 981 } // namespace ash
OLDNEW
« no previous file with comments | « ash/root_window_controller_unittest.cc ('k') | chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698