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

Side by Side Diff: ash/shell.cc

Issue 613343005: Automatic deployment of the virtual keyboard. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | ash/virtual_keyboard_controller.h » ('j') | ash/virtual_keyboard_controller.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 869 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 focus_client_.reset(focus_controller); 880 focus_client_.reset(focus_controller);
881 activation_client_ = focus_controller; 881 activation_client_ = focus_controller;
882 activation_client_->AddObserver(this); 882 activation_client_->AddObserver(this);
883 focus_cycler_.reset(new FocusCycler()); 883 focus_cycler_.reset(new FocusCycler());
884 884
885 screen_position_controller_.reset(new ScreenPositionController); 885 screen_position_controller_.reset(new ScreenPositionController);
886 886
887 display_controller_->Start(); 887 display_controller_->Start();
888 display_controller_->CreatePrimaryHost( 888 display_controller_->CreatePrimaryHost(
889 ShellInitParamsToAshWindowTreeHostInitParams(init_params)); 889 ShellInitParamsToAshWindowTreeHostInitParams(init_params));
890 virtual_keyboard_controller_.reset(new VirtualKeyboardController);
891 aura::Window* root_window = display_controller_->GetPrimaryRootWindow(); 890 aura::Window* root_window = display_controller_->GetPrimaryRootWindow();
892 target_root_window_ = root_window; 891 target_root_window_ = root_window;
893 892
894 #if defined(OS_CHROMEOS) 893 #if defined(OS_CHROMEOS)
895 resolution_notification_controller_.reset( 894 resolution_notification_controller_.reset(
896 new ResolutionNotificationController); 895 new ResolutionNotificationController);
897 #endif 896 #endif
898 897
899 cursor_manager_.SetDisplay(GetScreen()->GetPrimaryDisplay()); 898 cursor_manager_.SetDisplay(GetScreen()->GetPrimaryDisplay());
900 899
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 1024
1026 #if defined(OS_CHROMEOS) && defined(USE_X11) 1025 #if defined(OS_CHROMEOS) && defined(USE_X11)
1027 // Create TouchTransformerController before DisplayController::InitDisplays() 1026 // Create TouchTransformerController before DisplayController::InitDisplays()
1028 // since TouchTransformerController listens on 1027 // since TouchTransformerController listens on
1029 // DisplayController::Observer::OnDisplaysInitialized(). 1028 // DisplayController::Observer::OnDisplaysInitialized().
1030 touch_transformer_controller_.reset(new TouchTransformerController()); 1029 touch_transformer_controller_.reset(new TouchTransformerController());
1031 #endif // defined(OS_CHROMEOS) && defined(USE_X11) 1030 #endif // defined(OS_CHROMEOS) && defined(USE_X11)
1032 1031
1033 display_controller_->InitDisplays(); 1032 display_controller_->InitDisplays();
1034 1033
1034 // Needs to be created after InitDisplays() since it may cause the virtual
1035 // keyboard to be deployed.
1036 virtual_keyboard_controller_.reset(new VirtualKeyboardController);
1037
1035 // It needs to be created after RootWindowController has been created 1038 // It needs to be created after RootWindowController has been created
1036 // (which calls OnWindowResized has been called, otherwise the 1039 // (which calls OnWindowResized has been called, otherwise the
1037 // widget will not paint when restoring after a browser crash. Also it needs 1040 // widget will not paint when restoring after a browser crash. Also it needs
1038 // to be created after InitSecondaryDisplays() to initialize the wallpapers in 1041 // to be created after InitSecondaryDisplays() to initialize the wallpapers in
1039 // the correct size. 1042 // the correct size.
1040 user_wallpaper_delegate_->InitializeWallpaper(); 1043 user_wallpaper_delegate_->InitializeWallpaper();
1041 1044
1042 if (initially_hide_cursor_) 1045 if (initially_hide_cursor_)
1043 cursor_manager_.HideCursor(); 1046 cursor_manager_.HideCursor();
1044 cursor_manager_.SetCursor(ui::kCursorPointer); 1047 cursor_manager_.SetCursor(ui::kCursorPointer);
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1159 //////////////////////////////////////////////////////////////////////////////// 1162 ////////////////////////////////////////////////////////////////////////////////
1160 // Shell, aura::client::ActivationChangeObserver implementation: 1163 // Shell, aura::client::ActivationChangeObserver implementation:
1161 1164
1162 void Shell::OnWindowActivated(aura::Window* gained_active, 1165 void Shell::OnWindowActivated(aura::Window* gained_active,
1163 aura::Window* lost_active) { 1166 aura::Window* lost_active) {
1164 if (gained_active) 1167 if (gained_active)
1165 target_root_window_ = gained_active->GetRootWindow(); 1168 target_root_window_ = gained_active->GetRootWindow();
1166 } 1169 }
1167 1170
1168 } // namespace ash 1171 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/virtual_keyboard_controller.h » ('j') | ash/virtual_keyboard_controller.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698