OLD | NEW |
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 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
696 } | 696 } |
697 | 697 |
698 shell->AddShellObserver(this); | 698 shell->AddShellObserver(this); |
699 | 699 |
700 if (root_window_type == PRIMARY) { | 700 if (root_window_type == PRIMARY) { |
701 root_window_layout()->OnWindowResized(); | 701 root_window_layout()->OnWindowResized(); |
702 if (!keyboard::IsKeyboardUsabilityExperimentEnabled()) | 702 if (!keyboard::IsKeyboardUsabilityExperimentEnabled()) |
703 shell->InitKeyboard(); | 703 shell->InitKeyboard(); |
704 } else { | 704 } else { |
705 root_window_layout()->OnWindowResized(); | 705 root_window_layout()->OnWindowResized(); |
706 shell->desktop_background_controller()->OnRootWindowAdded(root_window()); | |
707 shell->high_contrast_controller()->OnRootWindowAdded(root_window()); | |
708 host_->Show(); | 706 host_->Show(); |
709 | 707 |
710 // Create a shelf if a user is already logged in. | 708 // Create a shelf if a user is already logged in. |
711 if (shell->session_state_delegate()->NumberOfLoggedInUsers()) | 709 if (shell->session_state_delegate()->NumberOfLoggedInUsers()) |
712 shelf()->CreateShelf(); | 710 shelf()->CreateShelf(); |
| 711 |
| 712 // Notify shell observers about new root window. |
| 713 shell->OnRootWindowAdded(root_window()); |
713 } | 714 } |
714 } | 715 } |
715 | 716 |
716 void RootWindowController::InitLayoutManagers() { | 717 void RootWindowController::InitLayoutManagers() { |
717 root_window_layout_ = new RootWindowLayoutManager(root_window()); | 718 root_window_layout_ = new RootWindowLayoutManager(root_window()); |
718 root_window()->SetLayoutManager(root_window_layout_); | 719 root_window()->SetLayoutManager(root_window_layout_); |
719 | 720 |
720 aura::Window* default_container = | 721 aura::Window* default_container = |
721 GetContainer(kShellWindowId_DefaultContainer); | 722 GetContainer(kShellWindowId_DefaultContainer); |
722 // Workspace manager has its own layout managers. | 723 // Workspace manager has its own layout managers. |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
998 else | 999 else |
999 DisableTouchHudProjection(); | 1000 DisableTouchHudProjection(); |
1000 } | 1001 } |
1001 | 1002 |
1002 RootWindowController* GetRootWindowController( | 1003 RootWindowController* GetRootWindowController( |
1003 const aura::Window* root_window) { | 1004 const aura::Window* root_window) { |
1004 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; | 1005 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; |
1005 } | 1006 } |
1006 | 1007 |
1007 } // namespace ash | 1008 } // namespace ash |
OLD | NEW |