| 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/shell.h" | 5 #include "ash/shell.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ash/app_list/app_list.h" | 9 #include "ash/app_list/app_list.h" |
| 10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
| (...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 879 workspace_controller_->workspace_manager()->set_shelf(shelf_layout_manager); | 879 workspace_controller_->workspace_manager()->set_shelf(shelf_layout_manager); |
| 880 shelf_layout_manager->set_workspace_manager( | 880 shelf_layout_manager->set_workspace_manager( |
| 881 workspace_controller_->workspace_manager()); | 881 workspace_controller_->workspace_manager()); |
| 882 | 882 |
| 883 aura::Window* always_on_top_container = | 883 aura::Window* always_on_top_container = |
| 884 GetContainer(internal::kShellWindowId_AlwaysOnTopContainer); | 884 GetContainer(internal::kShellWindowId_AlwaysOnTopContainer); |
| 885 always_on_top_container->SetLayoutManager( | 885 always_on_top_container->SetLayoutManager( |
| 886 new internal::BaseLayoutManager( | 886 new internal::BaseLayoutManager( |
| 887 always_on_top_container->GetRootWindow())); | 887 always_on_top_container->GetRootWindow())); |
| 888 | 888 |
| 889 // Create desktop background widget. | 889 // Before login, the desktop background set to the default wallpaper. |
| 890 desktop_background_controller_->SetDesktopBackgroundImageMode(); | 890 // When browser crashes, this will load user's wallpaper from resources (slow |
| 891 // on Alex). |
| 892 desktop_background_controller_->SetLoggedInUserWallpaper(); |
| 891 | 893 |
| 892 // Create Panel layout manager | 894 // Create Panel layout manager |
| 893 if (CommandLine::ForCurrentProcess()-> | 895 if (CommandLine::ForCurrentProcess()-> |
| 894 HasSwitch(switches::kAuraPanelManager)) { | 896 HasSwitch(switches::kAuraPanelManager)) { |
| 895 aura::Window* panel_container = GetContainer( | 897 aura::Window* panel_container = GetContainer( |
| 896 internal::kShellWindowId_PanelContainer); | 898 internal::kShellWindowId_PanelContainer); |
| 897 panel_layout_manager_ = | 899 panel_layout_manager_ = |
| 898 new internal::PanelLayoutManager(panel_container); | 900 new internal::PanelLayoutManager(panel_container); |
| 899 panel_container->SetEventFilter( | 901 panel_container->SetEventFilter( |
| 900 new internal::PanelWindowEventFilter( | 902 new internal::PanelWindowEventFilter( |
| 901 panel_container, panel_layout_manager_)); | 903 panel_container, panel_layout_manager_)); |
| 902 panel_container->SetLayoutManager(panel_layout_manager_); | 904 panel_container->SetLayoutManager(panel_layout_manager_); |
| 903 } | 905 } |
| 904 } | 906 } |
| 905 | 907 |
| 906 void Shell::DisableWorkspaceGridLayout() { | 908 void Shell::DisableWorkspaceGridLayout() { |
| 907 if (workspace_controller_.get()) | 909 if (workspace_controller_.get()) |
| 908 workspace_controller_->workspace_manager()->set_grid_size(0); | 910 workspace_controller_->workspace_manager()->set_grid_size(0); |
| 909 } | 911 } |
| 910 | 912 |
| 911 } // namespace ash | 913 } // namespace ash |
| OLD | NEW |