Chromium Code Reviews| 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/content_client/shell_browser_main_parts.h" | 5 #include "ash/shell/content_client/shell_browser_main_parts.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/desktop_background/desktop_background_controller.h" | 8 #include "ash/desktop_background/desktop_background_controller.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/shell/shell_delegate_impl.h" | 10 #include "ash/shell/shell_delegate_impl.h" |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 30 #include "ui/gfx/screen.h" | 30 #include "ui/gfx/screen.h" |
| 31 #include "ui/message_center/message_center.h" | 31 #include "ui/message_center/message_center.h" |
| 32 #include "ui/views/test/test_views_delegate.h" | 32 #include "ui/views/test/test_views_delegate.h" |
| 33 #include "ui/wm/core/wm_state.h" | 33 #include "ui/wm/core/wm_state.h" |
| 34 | 34 |
| 35 #if defined(USE_X11) | 35 #if defined(USE_X11) |
| 36 #include "ui/events/x/touch_factory_x11.h" | 36 #include "ui/events/x/touch_factory_x11.h" |
| 37 #endif | 37 #endif |
| 38 | 38 |
| 39 #if defined(OS_CHROMEOS) | 39 #if defined(OS_CHROMEOS) |
| 40 #include "chrome/browser/chromeos/login/wallpaper_manager.h" | |
| 40 #include "chromeos/audio/cras_audio_handler.h" | 41 #include "chromeos/audio/cras_audio_handler.h" |
| 41 #include "chromeos/dbus/dbus_thread_manager.h" | 42 #include "chromeos/dbus/dbus_thread_manager.h" |
| 42 #endif | 43 #endif |
| 43 | 44 |
| 44 namespace ash { | 45 namespace ash { |
| 45 namespace shell { | 46 namespace shell { |
| 46 void InitWindowTypeLauncher(); | 47 void InitWindowTypeLauncher(); |
| 47 | 48 |
| 48 namespace { | 49 namespace { |
| 49 | 50 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 127 ash::Shell::GetInstance()->UpdateAfterLoginStatusChange( | 128 ash::Shell::GetInstance()->UpdateAfterLoginStatusChange( |
| 128 user::LOGGED_IN_USER); | 129 user::LOGGED_IN_USER); |
| 129 | 130 |
| 130 window_watcher_.reset(new ash::shell::WindowWatcher); | 131 window_watcher_.reset(new ash::shell::WindowWatcher); |
| 131 gfx::Screen* screen = Shell::GetInstance()->GetScreen(); | 132 gfx::Screen* screen = Shell::GetInstance()->GetScreen(); |
| 132 screen->AddObserver(window_watcher_.get()); | 133 screen->AddObserver(window_watcher_.get()); |
| 133 delegate_->SetWatcher(window_watcher_.get()); | 134 delegate_->SetWatcher(window_watcher_.get()); |
| 134 | 135 |
| 135 ash::shell::InitWindowTypeLauncher(); | 136 ash::shell::InitWindowTypeLauncher(); |
| 136 | 137 |
| 137 Shell::GetInstance()->desktop_background_controller()->SetDefaultWallpaper( | 138 #if defined(OS_CHROMEOS) |
|
Alexander Alekseev
2014/04/09 14:37:38
Scott, can I completely remove this call? (you've
| |
| 138 false /* is_guest */); | 139 chromeos::WallpaperManager::Get()-> |
| 140 SetDefaultWallpaperDelayed(chromeos::UserManager::kSignInUser); | |
|
Alexander Alekseev
2014/04/08 16:34:20
This breaks dependencies.
Should I remove this cal
sky
2014/04/09 16:49:36
If unsure, try it out. We need a wallpaper to work
| |
| 141 #endif | |
| 139 | 142 |
| 140 ash::Shell::GetPrimaryRootWindow()->GetHost()->Show(); | 143 ash::Shell::GetPrimaryRootWindow()->GetHost()->Show(); |
| 141 } | 144 } |
| 142 | 145 |
| 143 void ShellBrowserMainParts::PostMainMessageLoopRun() { | 146 void ShellBrowserMainParts::PostMainMessageLoopRun() { |
| 144 gfx::Screen* screen = Shell::GetInstance()->GetScreen(); | 147 gfx::Screen* screen = Shell::GetInstance()->GetScreen(); |
| 145 screen->RemoveObserver(window_watcher_.get()); | 148 screen->RemoveObserver(window_watcher_.get()); |
| 146 | 149 |
| 147 window_watcher_.reset(); | 150 window_watcher_.reset(); |
| 148 delegate_->SetWatcher(NULL); | 151 delegate_->SetWatcher(NULL); |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 165 browser_context_.reset(); | 168 browser_context_.reset(); |
| 166 } | 169 } |
| 167 | 170 |
| 168 bool ShellBrowserMainParts::MainMessageLoopRun(int* result_code) { | 171 bool ShellBrowserMainParts::MainMessageLoopRun(int* result_code) { |
| 169 base::MessageLoopForUI::current()->Run(); | 172 base::MessageLoopForUI::current()->Run(); |
| 170 return true; | 173 return true; |
| 171 } | 174 } |
| 172 | 175 |
| 173 } // namespace shell | 176 } // namespace shell |
| 174 } // namespace ash | 177 } // namespace ash |
| OLD | NEW |