| 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 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 714 } | 714 } |
| 715 | 715 |
| 716 shell->AddShellObserver(this); | 716 shell->AddShellObserver(this); |
| 717 | 717 |
| 718 if (root_window_type == PRIMARY) { | 718 if (root_window_type == PRIMARY) { |
| 719 root_window_layout()->OnWindowResized(); | 719 root_window_layout()->OnWindowResized(); |
| 720 if (!keyboard::IsKeyboardUsabilityExperimentEnabled()) | 720 if (!keyboard::IsKeyboardUsabilityExperimentEnabled()) |
| 721 shell->InitKeyboard(); | 721 shell->InitKeyboard(); |
| 722 } else { | 722 } else { |
| 723 root_window_layout()->OnWindowResized(); | 723 root_window_layout()->OnWindowResized(); |
| 724 shell->desktop_background_controller()->OnRootWindowAdded(root_window); | |
| 725 shell->high_contrast_controller()->OnRootWindowAdded(root_window); | |
| 726 ash_host_->AsWindowTreeHost()->Show(); | 724 ash_host_->AsWindowTreeHost()->Show(); |
| 727 | 725 |
| 728 // Create a shelf if a user is already logged in. | 726 // Create a shelf if a user is already logged in. |
| 729 if (shell->session_state_delegate()->NumberOfLoggedInUsers()) | 727 if (shell->session_state_delegate()->NumberOfLoggedInUsers()) |
| 730 shelf()->CreateShelf(); | 728 shelf()->CreateShelf(); |
| 729 |
| 730 // Notify shell observers about new root window. |
| 731 shell->OnRootWindowAdded(root_window); |
| 731 } | 732 } |
| 732 } | 733 } |
| 733 | 734 |
| 734 void RootWindowController::InitLayoutManagers() { | 735 void RootWindowController::InitLayoutManagers() { |
| 735 aura::Window* root_window = GetRootWindow(); | 736 aura::Window* root_window = GetRootWindow(); |
| 736 root_window_layout_ = new RootWindowLayoutManager(root_window); | 737 root_window_layout_ = new RootWindowLayoutManager(root_window); |
| 737 root_window->SetLayoutManager(root_window_layout_); | 738 root_window->SetLayoutManager(root_window_layout_); |
| 738 | 739 |
| 739 aura::Window* default_container = | 740 aura::Window* default_container = |
| 740 GetContainer(kShellWindowId_DefaultContainer); | 741 GetContainer(kShellWindowId_DefaultContainer); |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1017 else | 1018 else |
| 1018 DisableTouchHudProjection(); | 1019 DisableTouchHudProjection(); |
| 1019 } | 1020 } |
| 1020 | 1021 |
| 1021 RootWindowController* GetRootWindowController( | 1022 RootWindowController* GetRootWindowController( |
| 1022 const aura::Window* root_window) { | 1023 const aura::Window* root_window) { |
| 1023 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; | 1024 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; |
| 1024 } | 1025 } |
| 1025 | 1026 |
| 1026 } // namespace ash | 1027 } // namespace ash |
| OLD | NEW |