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

Side by Side Diff: ash/root_window_controller.cc

Issue 25105002: Deletes keyboard container before recreating the controller. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Deletes old container before creating a new keyboard controller. 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
« no previous file with comments | « no previous file | 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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 aura::Window* parent = root_window(); 524 aura::Window* parent = root_window();
525 525
526 keyboard::KeyboardControllerProxy* proxy = 526 keyboard::KeyboardControllerProxy* proxy =
527 Shell::GetInstance()->delegate()->CreateKeyboardControllerProxy(); 527 Shell::GetInstance()->delegate()->CreateKeyboardControllerProxy();
528 keyboard_controller_.reset( 528 keyboard_controller_.reset(
529 new keyboard::KeyboardController(proxy)); 529 new keyboard::KeyboardController(proxy));
530 530
531 keyboard_controller_->AddObserver(shelf()->shelf_layout_manager()); 531 keyboard_controller_->AddObserver(shelf()->shelf_layout_manager());
532 keyboard_controller_->AddObserver(panel_layout_manager_); 532 keyboard_controller_->AddObserver(panel_layout_manager_);
533 533
534 // Deletes the old container if it exists.
sadrul 2013/10/01 14:28:28 Add a comment here that the KeyboardController rec
rsadam 2013/10/01 14:44:00 Done.
535 delete GetContainer(kShellWindowId_VirtualKeyboardContainer);
536
534 aura::Window* keyboard_container = 537 aura::Window* keyboard_container =
535 keyboard_controller_->GetContainerWindow(); 538 keyboard_controller_->GetContainerWindow();
536 keyboard_container->set_id(kShellWindowId_VirtualKeyboardContainer); 539 keyboard_container->set_id(kShellWindowId_VirtualKeyboardContainer);
537 parent->AddChild(keyboard_container); 540 parent->AddChild(keyboard_container);
538 keyboard_container->SetBounds(parent->bounds()); 541 keyboard_container->SetBounds(parent->bounds());
539 } 542 }
540 } 543 }
541 544
542 545
543 //////////////////////////////////////////////////////////////////////////////// 546 ////////////////////////////////////////////////////////////////////////////////
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 DisableTouchHudProjection(); 827 DisableTouchHudProjection();
825 } 828 }
826 829
827 RootWindowController* GetRootWindowController( 830 RootWindowController* GetRootWindowController(
828 const aura::RootWindow* root_window) { 831 const aura::RootWindow* root_window) {
829 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; 832 return root_window ? GetRootWindowSettings(root_window)->controller : NULL;
830 } 833 }
831 834
832 } // namespace internal 835 } // namespace internal
833 } // namespace ash 836 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698