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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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, | 189 true, |
190 extensions::Manifest::COMPONENT, | 190 extensions::Manifest::COMPONENT, |
191 Extension::NO_FLAGS, | 191 Extension::NO_FLAGS, |
192 extensions_dir, | 192 extensions_dir, |
193 content::BrowserThread::GetMessageLoopProxyForThread( | 193 content::BrowserThread::GetMessageLoopProxyForThread( |
194 content::BrowserThread::FILE), | 194 content::BrowserThread::FILE).get(), |
195 new ScreensaverUnpackerClient( | 195 new ScreensaverUnpackerClient( |
196 screensaver_crx, | 196 screensaver_crx, |
197 base::Bind( | 197 base::Bind( |
198 &KioskModeScreensaver::SetupScreensaver, | 198 &KioskModeScreensaver::SetupScreensaver, |
199 weak_ptr_factory_.GetWeakPtr())))); | 199 weak_ptr_factory_.GetWeakPtr())))); |
200 | 200 |
201 // Fire off the unpacker on the file thread; don't need it to return. | 201 // Fire off the unpacker on the file thread; don't need it to return. |
202 content::BrowserThread::PostTask( | 202 content::BrowserThread::PostTask( |
203 content::BrowserThread::FILE, | 203 content::BrowserThread::FILE, |
204 FROM_HERE, | 204 FROM_HERE, |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 | 274 |
275 g_kiosk_mode_screensaver = new KioskModeScreensaver(); | 275 g_kiosk_mode_screensaver = new KioskModeScreensaver(); |
276 } | 276 } |
277 | 277 |
278 void ShutdownKioskModeScreensaver() { | 278 void ShutdownKioskModeScreensaver() { |
279 delete g_kiosk_mode_screensaver; | 279 delete g_kiosk_mode_screensaver; |
280 g_kiosk_mode_screensaver = NULL; | 280 g_kiosk_mode_screensaver = NULL; |
281 } | 281 } |
282 | 282 |
283 } // namespace chromeos | 283 } // namespace chromeos |
OLD | NEW |