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/login/user_image_screen.h" | 5 #include "chrome/browser/chromeos/login/user_image_screen.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 9 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
10 #include "chrome/browser/chromeos/login/default_user_images.h" | 10 #include "chrome/browser/chromeos/login/default_user_images.h" |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 bool is_screen_locked = *content::Details<bool>(details).ptr(); | 161 bool is_screen_locked = *content::Details<bool>(details).ptr(); |
162 if (is_screen_locked) | 162 if (is_screen_locked) |
163 StopCamera(); | 163 StopCamera(); |
164 else if (actor_ && actor_->IsCapturing()) | 164 else if (actor_ && actor_->IsCapturing()) |
165 StartCamera(); | 165 StartCamera(); |
166 break; | 166 break; |
167 } | 167 } |
168 case chrome::NOTIFICATION_PROFILE_IMAGE_UPDATED: { | 168 case chrome::NOTIFICATION_PROFILE_IMAGE_UPDATED: { |
169 // We've got a new profile image. | 169 // We've got a new profile image. |
170 if (actor_) { | 170 if (actor_) { |
171 gfx::ImageSkia profile_image( | 171 actor_->AddProfileImage( |
172 *content::Details<const SkBitmap>(details).ptr()); | 172 *content::Details<const gfx::ImageSkia>(details).ptr()); |
173 actor_->AddProfileImage(profile_image); | |
174 } | 173 } |
175 break; | 174 break; |
176 } | 175 } |
177 case chrome::NOTIFICATION_PROFILE_IMAGE_UPDATE_FAILED: { | 176 case chrome::NOTIFICATION_PROFILE_IMAGE_UPDATE_FAILED: { |
178 // User has a default profile image or fetching profile image has failed. | 177 // User has a default profile image or fetching profile image has failed. |
179 if (actor_) | 178 if (actor_) |
180 actor_->OnProfileImageAbsent(); | 179 actor_->OnProfileImageAbsent(); |
181 break; | 180 break; |
182 } | 181 } |
183 default: | 182 default: |
184 NOTREACHED(); | 183 NOTREACHED(); |
185 } | 184 } |
186 } | 185 } |
187 | 186 |
188 } // namespace chromeos | 187 } // namespace chromeos |
OLD | NEW |