Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Side by Side Diff: chrome/browser/chromeos/login/user_manager_impl.cc

Issue 10537158: Add support for Ash to Notifications (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix win/mac compile Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/login/user_manager_impl.h" 5 #include "chrome/browser/chromeos/login/user_manager_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/desktop_background/desktop_background_controller.h" 10 #include "ash/desktop_background/desktop_background_controller.h"
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 // In customized mode, we use index pref to save the user selected 402 // In customized mode, we use index pref to save the user selected
403 // wallpaper layout. See function SaveWallpaperToLocalState(). 403 // wallpaper layout. See function SaveWallpaperToLocalState().
404 ash::WallpaperLayout layout = static_cast<ash::WallpaperLayout>(index); 404 ash::WallpaperLayout layout = static_cast<ash::WallpaperLayout>(index);
405 // Load user image asynchronously. 405 // Load user image asynchronously.
406 image_loader_->Start( 406 image_loader_->Start(
407 wallpaper_path, 0, false, 407 wallpaper_path, 0, false,
408 base::Bind(&UserManagerImpl::OnCustomWallpaperLoaded, 408 base::Bind(&UserManagerImpl::OnCustomWallpaperLoaded,
409 base::Unretained(this), email, layout)); 409 base::Unretained(this), email, layout));
410 return; 410 return;
411 } 411 }
412 if (!ash::Shell::HasInstance())
413 return;
412 ash::Shell::GetInstance()->desktop_background_controller()-> 414 ash::Shell::GetInstance()->desktop_background_controller()->
413 SetDefaultWallpaper(index); 415 SetDefaultWallpaper(index);
414 } 416 }
415 } 417 }
416 418
417 void UserManagerImpl::SessionStarted() { 419 void UserManagerImpl::SessionStarted() {
418 session_started_ = true; 420 session_started_ = true;
419 content::NotificationService::current()->Notify( 421 content::NotificationService::current()->Notify(
420 chrome::NOTIFICATION_SESSION_STARTED, 422 chrome::NOTIFICATION_SESSION_STARTED,
421 content::NotificationService::AllSources(), 423 content::NotificationService::AllSources(),
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1552 BrowserThread::PostTask( 1554 BrowserThread::PostTask(
1553 BrowserThread::FILE, 1555 BrowserThread::FILE,
1554 FROM_HERE, 1556 FROM_HERE,
1555 base::Bind(&UserManagerImpl::DeleteUserImage, 1557 base::Bind(&UserManagerImpl::DeleteUserImage,
1556 base::Unretained(this), 1558 base::Unretained(this),
1557 image_path)); 1559 image_path));
1558 } 1560 }
1559 } 1561 }
1560 1562
1561 } // namespace chromeos 1563 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698