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

Side by Side Diff: ash/root_window_controller.cc

Issue 587243004: Remove more keyboard usability related code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « ash/root_window_controller.h ('k') | no next file » | no next file with comments »
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/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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 RootWindowController* controller = new RootWindowController(host); 267 RootWindowController* controller = new RootWindowController(host);
268 controller->Init(RootWindowController::PRIMARY, 268 controller->Init(RootWindowController::PRIMARY,
269 Shell::GetInstance()->delegate()->IsFirstRunAfterBoot()); 269 Shell::GetInstance()->delegate()->IsFirstRunAfterBoot());
270 } 270 }
271 271
272 void RootWindowController::CreateForSecondaryDisplay(AshWindowTreeHost* host) { 272 void RootWindowController::CreateForSecondaryDisplay(AshWindowTreeHost* host) {
273 RootWindowController* controller = new RootWindowController(host); 273 RootWindowController* controller = new RootWindowController(host);
274 controller->Init(RootWindowController::SECONDARY, false /* first run */); 274 controller->Init(RootWindowController::SECONDARY, false /* first run */);
275 } 275 }
276 276
277 void RootWindowController::CreateForVirtualKeyboardDisplay(
278 AshWindowTreeHost* host) {
279 RootWindowController* controller = new RootWindowController(host);
280 controller->Init(RootWindowController::VIRTUAL_KEYBOARD,
281 false /* first run */);
282 }
283
284 // static 277 // static
285 RootWindowController* RootWindowController::ForShelf( 278 RootWindowController* RootWindowController::ForShelf(
286 const aura::Window* window) { 279 const aura::Window* window) {
287 CHECK(Shell::HasInstance()); 280 CHECK(Shell::HasInstance());
288 return GetRootWindowController(window->GetRootWindow()); 281 return GetRootWindowController(window->GetRootWindow());
289 } 282 }
290 283
291 // static 284 // static
292 RootWindowController* RootWindowController::ForWindow( 285 RootWindowController* RootWindowController::ForWindow(
293 const aura::Window* window) { 286 const aura::Window* window) {
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 705
713 void RootWindowController::Init(RootWindowType root_window_type, 706 void RootWindowController::Init(RootWindowType root_window_type,
714 bool first_run_after_boot) { 707 bool first_run_after_boot) {
715 aura::Window* root_window = GetRootWindow(); 708 aura::Window* root_window = GetRootWindow();
716 Shell* shell = Shell::GetInstance(); 709 Shell* shell = Shell::GetInstance();
717 shell->InitRootWindow(root_window); 710 shell->InitRootWindow(root_window);
718 711
719 ash_host_->AsWindowTreeHost()->SetCursor(ui::kCursorPointer); 712 ash_host_->AsWindowTreeHost()->SetCursor(ui::kCursorPointer);
720 CreateContainersInRootWindow(root_window); 713 CreateContainersInRootWindow(root_window);
721 714
722 if (root_window_type == VIRTUAL_KEYBOARD) {
723 aura::Window* virtual_keyboard_parent_container = GetContainer(
724 kShellWindowId_VirtualKeyboardParentContainer);
725 virtual_keyboard_parent_container->SetBounds(root_window->bounds());
726 shell->InitKeyboard();
727 return;
728 }
729
730 CreateSystemBackground(first_run_after_boot); 715 CreateSystemBackground(first_run_after_boot);
731 716
732 InitLayoutManagers(); 717 InitLayoutManagers();
733 InitTouchHuds(); 718 InitTouchHuds();
734 719
735 if (Shell::GetPrimaryRootWindowController()-> 720 if (Shell::GetPrimaryRootWindowController()->
736 GetSystemModalLayoutManager(NULL)->has_modal_background()) { 721 GetSystemModalLayoutManager(NULL)->has_modal_background()) {
737 GetSystemModalLayoutManager(NULL)->CreateModalBackground(); 722 GetSystemModalLayoutManager(NULL)->CreateModalBackground();
738 } 723 }
739 724
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 else 1066 else
1082 DisableTouchHudProjection(); 1067 DisableTouchHudProjection();
1083 } 1068 }
1084 1069
1085 RootWindowController* GetRootWindowController( 1070 RootWindowController* GetRootWindowController(
1086 const aura::Window* root_window) { 1071 const aura::Window* root_window) {
1087 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; 1072 return root_window ? GetRootWindowSettings(root_window)->controller : NULL;
1088 } 1073 }
1089 1074
1090 } // namespace ash 1075 } // namespace ash
OLDNEW
« no previous file with comments | « ash/root_window_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698