OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/ui/webui/chromeos/login/user_image_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/user_image_screen_handler.h" |
6 | 6 |
7 #include "ash/audio/sounds.h" | 7 #include "ash/audio/sounds.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 "website", l10n_util::GetStringUTF16(kDefaultImageWebsiteIDs[i])); | 151 "website", l10n_util::GetStringUTF16(kDefaultImageWebsiteIDs[i])); |
152 image_data->SetString("title", GetDefaultImageDescription(i)); | 152 image_data->SetString("title", GetDefaultImageDescription(i)); |
153 image_urls.Append(image_data.release()); | 153 image_urls.Append(image_data.release()); |
154 } | 154 } |
155 CallJS("setDefaultImages", image_urls); | 155 CallJS("setDefaultImages", image_urls); |
156 if (!screen_) | 156 if (!screen_) |
157 return; | 157 return; |
158 if (screen_->selected_image() != User::kInvalidImageIndex) | 158 if (screen_->selected_image() != User::kInvalidImageIndex) |
159 SelectImage(screen_->selected_image()); | 159 SelectImage(screen_->selected_image()); |
160 | 160 |
161 if (screen_->profile_picture_data_url() != content::kAboutBlankURL) | 161 if (screen_->profile_picture_data_url() != url::kAboutBlankURL) |
162 SendProfileImage(screen_->profile_picture_data_url()); | 162 SendProfileImage(screen_->profile_picture_data_url()); |
163 else if (screen_->profile_picture_absent()) | 163 else if (screen_->profile_picture_absent()) |
164 OnProfileImageAbsent(); | 164 OnProfileImageAbsent(); |
165 } | 165 } |
166 | 166 |
167 void UserImageScreenHandler::HandleScreenReady() { | 167 void UserImageScreenHandler::HandleScreenReady() { |
168 is_ready_ = true; | 168 is_ready_ = true; |
169 if (screen_) | 169 if (screen_) |
170 screen_->OnScreenReady(); | 170 screen_->OnScreenReady(); |
171 } | 171 } |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 | 214 |
215 void UserImageScreenHandler::HideCurtain() { | 215 void UserImageScreenHandler::HideCurtain() { |
216 CallJS("hideCurtain"); | 216 CallJS("hideCurtain"); |
217 } | 217 } |
218 | 218 |
219 void UserImageScreenHandler::SetProfilePictureEnabled(bool enabled) { | 219 void UserImageScreenHandler::SetProfilePictureEnabled(bool enabled) { |
220 CallJS("setProfilePictureEnabled", enabled); | 220 CallJS("setProfilePictureEnabled", enabled); |
221 } | 221 } |
222 | 222 |
223 } // namespace chromeos | 223 } // namespace chromeos |
OLD | NEW |