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 "chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.h" | 5 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.h" |
6 | 6 |
7 #include "ash/screensaver/screensaver_view.h" | 7 #include "ash/screensaver/screensaver_view.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/wm/user_activity_detector.h" | 9 #include "ash/wm/user_activity_detector.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 return; | 179 return; |
180 | 180 |
181 Profile* default_profile = ProfileManager::GetDefaultProfile(); | 181 Profile* default_profile = ProfileManager::GetDefaultProfile(); |
182 if (!default_profile) | 182 if (!default_profile) |
183 return; | 183 return; |
184 base::FilePath extensions_dir = extensions::ExtensionSystem::Get( | 184 base::FilePath extensions_dir = extensions::ExtensionSystem::Get( |
185 default_profile)->extension_service()->install_directory(); | 185 default_profile)->extension_service()->install_directory(); |
186 scoped_refptr<SandboxedUnpacker> screensaver_unpacker( | 186 scoped_refptr<SandboxedUnpacker> screensaver_unpacker( |
187 new SandboxedUnpacker( | 187 new SandboxedUnpacker( |
188 screensaver_crx, | 188 screensaver_crx, |
189 true, | |
190 extensions::Manifest::COMPONENT, | 189 extensions::Manifest::COMPONENT, |
191 Extension::NO_FLAGS, | 190 Extension::NO_FLAGS, |
192 extensions_dir, | 191 extensions_dir, |
193 content::BrowserThread::GetMessageLoopProxyForThread( | 192 content::BrowserThread::GetMessageLoopProxyForThread( |
194 content::BrowserThread::FILE).get(), | 193 content::BrowserThread::FILE).get(), |
195 new ScreensaverUnpackerClient( | 194 new ScreensaverUnpackerClient( |
196 screensaver_crx, | 195 screensaver_crx, |
197 base::Bind( | 196 base::Bind( |
198 &KioskModeScreensaver::SetupScreensaver, | 197 &KioskModeScreensaver::SetupScreensaver, |
199 weak_ptr_factory_.GetWeakPtr())))); | 198 weak_ptr_factory_.GetWeakPtr())))); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 | 273 |
275 g_kiosk_mode_screensaver = new KioskModeScreensaver(); | 274 g_kiosk_mode_screensaver = new KioskModeScreensaver(); |
276 } | 275 } |
277 | 276 |
278 void ShutdownKioskModeScreensaver() { | 277 void ShutdownKioskModeScreensaver() { |
279 delete g_kiosk_mode_screensaver; | 278 delete g_kiosk_mode_screensaver; |
280 g_kiosk_mode_screensaver = NULL; | 279 g_kiosk_mode_screensaver = NULL; |
281 } | 280 } |
282 | 281 |
283 } // namespace chromeos | 282 } // namespace chromeos |
OLD | NEW |