| 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 } | 232 } |
| 233 | 233 |
| 234 // This dummy class is used for shell unit tests. We dont have chrome delegate | 234 // This dummy class is used for shell unit tests. We dont have chrome delegate |
| 235 // in these tests. | 235 // in these tests. |
| 236 class DummyUserWallpaperDelegate : public UserWallpaperDelegate { | 236 class DummyUserWallpaperDelegate : public UserWallpaperDelegate { |
| 237 public: | 237 public: |
| 238 DummyUserWallpaperDelegate() {} | 238 DummyUserWallpaperDelegate() {} |
| 239 | 239 |
| 240 virtual ~DummyUserWallpaperDelegate() {} | 240 virtual ~DummyUserWallpaperDelegate() {} |
| 241 | 241 |
| 242 virtual const int GetUserWallpaperIndex() OVERRIDE { | 242 virtual void SetLoggedInUserWallpaper() OVERRIDE { |
| 243 return -1; | 243 ash::Shell::GetInstance()->desktop_background_controller()-> |
| 244 CreateEmptyWallpaper(); |
| 244 } | 245 } |
| 245 | 246 |
| 246 virtual void OpenSetWallpaperPage() OVERRIDE { | 247 virtual void OpenSetWallpaperPage() OVERRIDE { |
| 247 } | 248 } |
| 248 | 249 |
| 249 virtual bool CanOpenSetWallpaperPage() OVERRIDE { | 250 virtual bool CanOpenSetWallpaperPage() OVERRIDE { |
| 250 return false; | 251 return false; |
| 251 } | 252 } |
| 252 | 253 |
| 253 private: | 254 private: |
| (...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 778 focus_cycler_->AddWidget(status_area_widget_); | 779 focus_cycler_->AddWidget(status_area_widget_); |
| 779 | 780 |
| 780 if (!delegate_.get() || delegate_->IsUserLoggedIn()) | 781 if (!delegate_.get() || delegate_->IsUserLoggedIn()) |
| 781 CreateLauncher(); | 782 CreateLauncher(); |
| 782 | 783 |
| 783 // Force a layout. | 784 // Force a layout. |
| 784 root_window->layout_manager()->OnWindowResized(); | 785 root_window->layout_manager()->OnWindowResized(); |
| 785 | 786 |
| 786 // It needs to be created after OnWindowResized has been called, otherwise the | 787 // It needs to be created after OnWindowResized has been called, otherwise the |
| 787 // widget will not paint when restoring after a browser crash. | 788 // widget will not paint when restoring after a browser crash. |
| 788 desktop_background_controller_->SetLoggedInUserWallpaper(); | 789 user_wallpaper_delegate_->SetLoggedInUserWallpaper(); |
| 789 | 790 |
| 790 window_modality_controller_.reset(new internal::WindowModalityController); | 791 window_modality_controller_.reset(new internal::WindowModalityController); |
| 791 AddRootWindowEventFilter(window_modality_controller_.get()); | 792 AddRootWindowEventFilter(window_modality_controller_.get()); |
| 792 | 793 |
| 793 visibility_controller_.reset(new internal::VisibilityController); | 794 visibility_controller_.reset(new internal::VisibilityController); |
| 794 aura::client::SetVisibilityClient(root_window, visibility_controller_.get()); | 795 aura::client::SetVisibilityClient(root_window, visibility_controller_.get()); |
| 795 | 796 |
| 796 drag_drop_controller_.reset(new internal::DragDropController); | 797 drag_drop_controller_.reset(new internal::DragDropController); |
| 797 aura::client::SetDragDropClient(root_window, drag_drop_controller_.get()); | 798 aura::client::SetDragDropClient(root_window, drag_drop_controller_.get()); |
| 798 | 799 |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1024 panel_container->SetLayoutManager(panel_layout_manager_); | 1025 panel_container->SetLayoutManager(panel_layout_manager_); |
| 1025 } | 1026 } |
| 1026 } | 1027 } |
| 1027 | 1028 |
| 1028 void Shell::DisableWorkspaceGridLayout() { | 1029 void Shell::DisableWorkspaceGridLayout() { |
| 1029 if (workspace_controller_.get()) | 1030 if (workspace_controller_.get()) |
| 1030 workspace_controller_->workspace_manager()->set_grid_size(0); | 1031 workspace_controller_->workspace_manager()->set_grid_size(0); |
| 1031 } | 1032 } |
| 1032 | 1033 |
| 1033 } // namespace ash | 1034 } // namespace ash |
| OLD | NEW |