| 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 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "ash/accelerators/focus_manager_factory.h" | 10 #include "ash/accelerators/focus_manager_factory.h" |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 } | 225 } |
| 226 | 226 |
| 227 // This dummy class is used for shell unit tests. We dont have chrome delegate | 227 // This dummy class is used for shell unit tests. We dont have chrome delegate |
| 228 // in these tests. | 228 // in these tests. |
| 229 class DummyUserWallpaperDelegate : public UserWallpaperDelegate { | 229 class DummyUserWallpaperDelegate : public UserWallpaperDelegate { |
| 230 public: | 230 public: |
| 231 DummyUserWallpaperDelegate() {} | 231 DummyUserWallpaperDelegate() {} |
| 232 | 232 |
| 233 virtual ~DummyUserWallpaperDelegate() {} | 233 virtual ~DummyUserWallpaperDelegate() {} |
| 234 | 234 |
| 235 virtual const int GetUserWallpaperIndex() OVERRIDE { | 235 virtual void SetLoggedInUserWallpaper() OVERRIDE { |
| 236 return -1; | |
| 237 } | 236 } |
| 238 | 237 |
| 239 virtual void OpenSetWallpaperPage() OVERRIDE { | 238 virtual void OpenSetWallpaperPage() OVERRIDE { |
| 240 } | 239 } |
| 241 | 240 |
| 242 virtual bool CanOpenSetWallpaperPage() OVERRIDE { | 241 virtual bool CanOpenSetWallpaperPage() OVERRIDE { |
| 243 return false; | 242 return false; |
| 244 } | 243 } |
| 245 | 244 |
| 246 private: | 245 private: |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 focus_cycler_->AddWidget(tray_->widget()); | 734 focus_cycler_->AddWidget(tray_->widget()); |
| 736 | 735 |
| 737 if (!delegate_.get() || delegate_->IsUserLoggedIn()) | 736 if (!delegate_.get() || delegate_->IsUserLoggedIn()) |
| 738 CreateLauncher(); | 737 CreateLauncher(); |
| 739 | 738 |
| 740 // Force a layout. | 739 // Force a layout. |
| 741 root_window->layout_manager()->OnWindowResized(); | 740 root_window->layout_manager()->OnWindowResized(); |
| 742 | 741 |
| 743 // It needs to be created after OnWindowResized has been called, otherwise the | 742 // It needs to be created after OnWindowResized has been called, otherwise the |
| 744 // widget will not paint when restoring after a browser crash. | 743 // widget will not paint when restoring after a browser crash. |
| 745 desktop_background_controller_->SetLoggedInUserWallpaper(); | 744 user_wallpaper_delegate_->SetLoggedInUserWallpaper(); |
| 746 | 745 |
| 747 window_modality_controller_.reset(new internal::WindowModalityController); | 746 window_modality_controller_.reset(new internal::WindowModalityController); |
| 748 AddRootWindowEventFilter(window_modality_controller_.get()); | 747 AddRootWindowEventFilter(window_modality_controller_.get()); |
| 749 | 748 |
| 750 visibility_controller_.reset(new internal::VisibilityController); | 749 visibility_controller_.reset(new internal::VisibilityController); |
| 751 | 750 |
| 752 tooltip_controller_.reset(new internal::TooltipController); | 751 tooltip_controller_.reset(new internal::TooltipController); |
| 753 AddRootWindowEventFilter(tooltip_controller_.get()); | 752 AddRootWindowEventFilter(tooltip_controller_.get()); |
| 754 | 753 |
| 755 drag_drop_controller_.reset(new internal::DragDropController); | 754 drag_drop_controller_.reset(new internal::DragDropController); |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 958 panel_container->SetLayoutManager(panel_layout_manager_); | 957 panel_container->SetLayoutManager(panel_layout_manager_); |
| 959 } | 958 } |
| 960 } | 959 } |
| 961 | 960 |
| 962 void Shell::DisableWorkspaceGridLayout() { | 961 void Shell::DisableWorkspaceGridLayout() { |
| 963 if (workspace_controller_.get()) | 962 if (workspace_controller_.get()) |
| 964 workspace_controller_->workspace_manager()->set_grid_size(0); | 963 workspace_controller_->workspace_manager()->set_grid_size(0); |
| 965 } | 964 } |
| 966 | 965 |
| 967 } // namespace ash | 966 } // namespace ash |
| OLD | NEW |