| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/signin/user_manager_screen_handler.h" | 5 #include "chrome/browser/ui/webui/signin/user_manager_screen_handler.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/value_conversions.h" | 8 #include "base/value_conversions.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 const char kKeyEmailAddress[] = "emailAddress"; | 40 const char kKeyEmailAddress[] = "emailAddress"; |
| 41 const char kKeyProfilePath[] = "profilePath"; | 41 const char kKeyProfilePath[] = "profilePath"; |
| 42 const char kKeyPublicAccount[] = "publicAccount"; | 42 const char kKeyPublicAccount[] = "publicAccount"; |
| 43 const char kKeyLocallyManagedUser[] = "locallyManagedUser"; | 43 const char kKeyLocallyManagedUser[] = "locallyManagedUser"; |
| 44 const char kKeySignedIn[] = "signedIn"; | 44 const char kKeySignedIn[] = "signedIn"; |
| 45 const char kKeyCanRemove[] = "canRemove"; | 45 const char kKeyCanRemove[] = "canRemove"; |
| 46 const char kKeyIsOwner[] = "isOwner"; | 46 const char kKeyIsOwner[] = "isOwner"; |
| 47 const char kKeyIsDesktop[] = "isDesktopUser"; | 47 const char kKeyIsDesktop[] = "isDesktopUser"; |
| 48 const char kKeyAvatarUrl[] = "userImage"; | 48 const char kKeyAvatarUrl[] = "userImage"; |
| 49 const char kKeyNeedsSignin[] = "needsSignin"; | 49 const char kKeyNeedsSignin[] = "needsSignin"; |
| 50 const char kGAIAPictureFileNameKey[] = "gaia_picture_file_name"; | |
| 51 | |
| 52 // Max number of users to show. | |
| 53 const size_t kMaxUsers = 18; | |
| 54 | |
| 55 // Type of the login screen UI that is currently presented to user. | |
| 56 const char kSourceGaiaSignin[] = "gaia-signin"; | |
| 57 const char kSourceAccountPicker[] = "account-picker"; | |
| 58 | 50 |
| 59 // JS API callback names. | 51 // JS API callback names. |
| 60 const char kJsApiUserManagerInitialize[] = "userManagerInitialize"; | 52 const char kJsApiUserManagerInitialize[] = "userManagerInitialize"; |
| 61 const char kJsApiUserManagerAddUser[] = "addUser"; | 53 const char kJsApiUserManagerAddUser[] = "addUser"; |
| 62 const char kJsApiUserManagerLaunchGuest[] = "launchGuest"; | 54 const char kJsApiUserManagerLaunchGuest[] = "launchGuest"; |
| 63 const char kJsApiUserManagerLaunchUser[] = "launchUser"; | 55 const char kJsApiUserManagerLaunchUser[] = "launchUser"; |
| 64 const char kJsApiUserManagerRemoveUser[] = "removeUser"; | 56 const char kJsApiUserManagerRemoveUser[] = "removeUser"; |
| 65 | 57 |
| 66 const size_t kAvatarIconSize = 160; | 58 const size_t kAvatarIconSize = 160; |
| 67 | 59 |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 // The row of user pods should display the active user first. | 346 // The row of user pods should display the active user first. |
| 355 if (is_active_user) | 347 if (is_active_user) |
| 356 users_list.Insert(0, profile_value); | 348 users_list.Insert(0, profile_value); |
| 357 else | 349 else |
| 358 users_list.Append(profile_value); | 350 users_list.Append(profile_value); |
| 359 } | 351 } |
| 360 | 352 |
| 361 web_ui()->CallJavascriptFunction("login.AccountPickerScreen.loadUsers", | 353 web_ui()->CallJavascriptFunction("login.AccountPickerScreen.loadUsers", |
| 362 users_list, base::FundamentalValue(false), base::FundamentalValue(true)); | 354 users_list, base::FundamentalValue(false), base::FundamentalValue(true)); |
| 363 } | 355 } |
| OLD | NEW |