diff options
author | merkulova <merkulova@chromium.org> | 2015-02-09 08:14:39 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-09 16:15:06 +0000 |
commit | 109d2339552df1c5ebff8a6174f983cd21390e34 (patch) | |
tree | 6c65bca14c1ea5322649172ed9e1214db5706cab | |
parent | 3faf5be059e1a62895f4ef665f2dc5e628bde4b8 (diff) | |
download | chromium_src-109d2339552df1c5ebff8a6174f983cd21390e34.zip chromium_src-109d2339552df1c5ebff8a6174f983cd21390e34.tar.gz chromium_src-109d2339552df1c5ebff8a6174f983cd21390e34.tar.bz2 |
Rename for some supervised users ambiguity. Adding child account icon to the avatar menu bubble.
BUG=440359
TBR=rsesek@chromium.org, noms@chromium.org, oshima@chromium.org
Review URL: https://codereview.chromium.org/898533005
Cr-Commit-Position: refs/heads/master@{#315318}
17 files changed, 42 insertions, 38 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index 7c5b0ba..4024307 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -14046,7 +14046,7 @@ After you create a new supervised user, you can manage their settings at any tim <message name="IDS_LOGIN_POD_MENU_REMOVE_ITEM_ACCESSIBLE_NAME" desc="Text to be spoken when 'Remove user' item is selected on the pod menu."> Remove this user </message> - <message name="IDS_LOGIN_POD_SUPERVISED_USER_REMOVE_WARNING" desc="Text shown as a warning when attempting to remove supervised user."> + <message name="IDS_LOGIN_POD_LEGACY_SUPERVISED_USER_REMOVE_WARNING" desc="Text shown as a warning when attempting to remove legacy supervised user."> All files and local data associated with the supervised user will be permanently deleted once this supervised user is removed. Visited websites and settings for this supervised user may still be visible by the manager at <ph name="MANAGEMENT_URL">$1<ex>www.example.com</ex></ph>. </message> <if expr="not chromeos"> diff --git a/chrome/app/theme/default_100_percent/common/avatar_menu_supervised.png b/chrome/app/theme/default_100_percent/common/avatar_menu_legacy_supervised.png Binary files differindex 8ae992a..8ae992a 100644 --- a/chrome/app/theme/default_100_percent/common/avatar_menu_supervised.png +++ b/chrome/app/theme/default_100_percent/common/avatar_menu_legacy_supervised.png diff --git a/chrome/app/theme/default_100_percent/common/icon_supervised.png b/chrome/app/theme/default_100_percent/common/icon_legacy_supervised.png Binary files differindex 98df6ee..98df6ee 100644 --- a/chrome/app/theme/default_100_percent/common/icon_supervised.png +++ b/chrome/app/theme/default_100_percent/common/icon_legacy_supervised.png diff --git a/chrome/app/theme/default_200_percent/common/avatar_menu_supervised.png b/chrome/app/theme/default_200_percent/common/avatar_menu_legacy_supervised.png Binary files differindex d618606..d618606 100644 --- a/chrome/app/theme/default_200_percent/common/avatar_menu_supervised.png +++ b/chrome/app/theme/default_200_percent/common/avatar_menu_legacy_supervised.png diff --git a/chrome/app/theme/default_200_percent/common/icon_supervised.png b/chrome/app/theme/default_200_percent/common/icon_legacy_supervised.png Binary files differindex e676d66..e676d66 100644 --- a/chrome/app/theme/default_200_percent/common/icon_supervised.png +++ b/chrome/app/theme/default_200_percent/common/icon_legacy_supervised.png diff --git a/chrome/app/theme/theme_resources.grd b/chrome/app/theme/theme_resources.grd index 955c5d0..742df53 100644 --- a/chrome/app/theme/theme_resources.grd +++ b/chrome/app/theme/theme_resources.grd @@ -379,8 +379,8 @@ <structure type="chrome_scaled_image" name="IDR_ICON_PROFILES_MENU_QUESTION_STABLE" file="common/profile_menu_question_stable.png" /> <structure type="chrome_scaled_image" name="IDR_ICON_PROFILES_MENU_QUESTION_HOVER" file="common/profile_menu_question_hover.png" /> <structure type="chrome_scaled_image" name="IDR_ICON_PROFILES_MENU_QUESTION_SELECT" file="common/profile_menu_question_select.png" /> - <structure type="chrome_scaled_image" name="IDR_ICON_PROFILES_MENU_SUPERVISED" file="common/avatar_menu_supervised.png" /> - <structure type="chrome_scaled_image" name="IDR_ICON_PROFILES_SUPERVISED" file="common/icon_supervised.png" /> + <structure type="chrome_scaled_image" name="IDR_ICON_PROFILES_MENU_LEGACY_SUPERVISED" file="common/avatar_menu_legacy_supervised.png" /> + <structure type="chrome_scaled_image" name="IDR_ICON_PROFILES_LEGACY_SUPERVISED" file="common/icon_legacy_supervised.png" /> </if> <if expr="not is_android and not is_ios and not chromeos"> <!-- User Manager tutorial --> @@ -470,7 +470,7 @@ <if expr="chromeos"> <structure type="chrome_scaled_image" name="IDR_KIOSK_APP_USER_POD_ICON" file="cros/kiosk_app_user_pod_icon.png" /> </if> - <structure type="chrome_scaled_image" name="IDR_SUPERVISED_USER_ICON" file="common/limited_user.png" /> + <structure type="chrome_scaled_image" name="IDR_LEGACY_SUPERVISED_USER_ICON" file="common/limited_user.png" /> <structure type="chrome_scaled_image" name="IDR_SUPERVISED_USER_LABEL_BOTTOM" file="common/supervised_user_theme/label_bg_bottom.png" /> <structure type="chrome_scaled_image" name="IDR_SUPERVISED_USER_LABEL_BOTTOM_LEFT" file="common/supervised_user_theme/label_bg_bottom_left.png" /> <structure type="chrome_scaled_image" name="IDR_SUPERVISED_USER_LABEL_BOTTOM_RIGHT" file="common/supervised_user_theme/label_bg_bottom_right.png" /> diff --git a/chrome/browser/chromeos/login/screens/user_selection_screen.cc b/chrome/browser/chromeos/login/screens/user_selection_screen.cc index 20064c8..e977394 100644 --- a/chrome/browser/chromeos/login/screens/user_selection_screen.cc +++ b/chrome/browser/chromeos/login/screens/user_selection_screen.cc @@ -35,7 +35,7 @@ const char kKeyDisplayName[] = "displayName"; const char kKeyEmailAddress[] = "emailAddress"; const char kKeyEnterpriseDomain[] = "enterpriseDomain"; const char kKeyPublicAccount[] = "publicAccount"; -const char kKeySupervisedUser[] = "supervisedUser"; +const char kKeyLegacySupervisedUser[] = "legacySupervisedUser"; const char kKeyChildUser[] = "childUser"; const char kKeyDesktopUser[] = "isDesktopUser"; const char kKeySignedIn[] = "signedIn"; @@ -141,7 +141,7 @@ void UserSelectionScreen::FillUserDictionary( const std::string& user_id = user->email(); const bool is_public_session = user->GetType() == user_manager::USER_TYPE_PUBLIC_ACCOUNT; - const bool is_supervised_user = + const bool is_legacy_supervised_user = user->GetType() == user_manager::USER_TYPE_SUPERVISED; const bool is_child_user = user->GetType() == user_manager::USER_TYPE_CHILD; @@ -149,7 +149,7 @@ void UserSelectionScreen::FillUserDictionary( user_dict->SetString(kKeyEmailAddress, user->display_email()); user_dict->SetString(kKeyDisplayName, user->GetDisplayName()); user_dict->SetBoolean(kKeyPublicAccount, is_public_session); - user_dict->SetBoolean(kKeySupervisedUser, is_supervised_user); + user_dict->SetBoolean(kKeyLegacySupervisedUser, is_legacy_supervised_user); user_dict->SetBoolean(kKeyChildUser, is_child_user); user_dict->SetBoolean(kKeyDesktopUser, false); user_dict->SetInteger(kKeyInitialAuthType, auth_type); diff --git a/chrome/browser/profiles/avatar_menu.cc b/chrome/browser/profiles/avatar_menu.cc index e86296f..c229aaf 100644 --- a/chrome/browser/profiles/avatar_menu.cc +++ b/chrome/browser/profiles/avatar_menu.cc @@ -225,8 +225,12 @@ base::string16 AvatarMenu::GetSupervisedUserInformation() const { } const gfx::Image& AvatarMenu::GetSupervisedUserIcon() const { + if (browser_ && browser_->profile()->IsChild()) { + return ResourceBundle::GetSharedInstance().GetNativeImageNamed( + IDR_CHILD_USER_ICON); + } return ResourceBundle::GetSharedInstance().GetNativeImageNamed( - IDR_SUPERVISED_USER_ICON); + IDR_LEGACY_SUPERVISED_USER_ICON); } void AvatarMenu::ActiveBrowserChanged(Browser* browser) { diff --git a/chrome/browser/resources/chromeos/login/screen_gaia_signin.html b/chrome/browser/resources/chromeos/login/screen_gaia_signin.html index 64f62ca..acae182 100644 --- a/chrome/browser/resources/chromeos/login/screen_gaia_signin.html +++ b/chrome/browser/resources/chromeos/login/screen_gaia_signin.html @@ -18,7 +18,7 @@ <div id="createSupervisedUserPane" class="signin-text"> <div id="createSupervisedUserSeparator"></div> <div id="createSupervisedUserLogo"> - <img src="chrome://theme/IDR_SUPERVISED_USER_ICON"> + <img src="chrome://theme/IDR_LEGACY_SUPERVISED_USER_ICON"> <span i18n-content="createSupervisedUserFeatureName"></span> </div> <div id="createSupervisedUserLinkPlaceholder"></div> diff --git a/chrome/browser/resources/user_manager/user_manager.css b/chrome/browser/resources/user_manager/user_manager.css index babcbb9..e3fc7c3 100644 --- a/chrome/browser/resources/user_manager/user_manager.css +++ b/chrome/browser/resources/user_manager/user_manager.css @@ -112,10 +112,10 @@ html[dir=rtl] .pod .indicators { display: initial; } -.pod.legacy-supervised .supervised-indicator { +.pod.legacy-supervised .legacy-supervised-indicator { background-image: -webkit-image-set( - url(chrome://theme/IDR_ICON_PROFILES_SUPERVISED) 1x, - url(chrome://theme/IDR_ICON_PROFILES_SUPERVISED@2x) 2x); + url(chrome://theme/IDR_ICON_PROFILES_LEGACY_SUPERVISED) 1x, + url(chrome://theme/IDR_ICON_PROFILES_LEGACY_SUPERVISED@2x) 2x); display: initial; } diff --git a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm index 0732470c..a33bfa9 100644 --- a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm +++ b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm @@ -1638,7 +1638,7 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver, [[NSImageView alloc] initWithFrame:NSZeroRect]); int imageId = browser_->profile()->IsChild() ? IDR_ICON_PROFILES_MENU_CHILD - : IDR_ICON_PROFILES_MENU_SUPERVISED; + : IDR_ICON_PROFILES_MENU_LEGACY_SUPERVISED; ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance(); [supervisedIcon setImage:rb->GetNativeImageNamed(imageId).ToNSImage()]; NSSize size = [[supervisedIcon image] size]; diff --git a/chrome/browser/ui/views/profiles/profile_chooser_view.cc b/chrome/browser/ui/views/profiles/profile_chooser_view.cc index 3e4ae7b..bd7aeb2 100644 --- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc +++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc @@ -1127,7 +1127,7 @@ views::View* ProfileChooserView::CreateCurrentProfileView( views::ImageView* supervised_icon = new views::ImageView(); int image_id = browser_->profile()->IsChild() ? IDR_ICON_PROFILES_MENU_CHILD - : IDR_ICON_PROFILES_MENU_SUPERVISED; + : IDR_ICON_PROFILES_MENU_LEGACY_SUPERVISED; supervised_icon->SetImage(rb->GetImageSkiaNamed(image_id)); gfx::Size preferred_size = supervised_icon->GetPreferredSize(); gfx::Rect parent_bounds = current_profile_photo_->bounds(); diff --git a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc index 4b91eb8..44cdf52 100644 --- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc +++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc @@ -432,8 +432,8 @@ void SigninScreenHandler::DeclareLocalizedValues( builder->Add("publicSessionSelectKeyboard", IDS_KEYBOARD_SELECTION_SELECT); builder->Add("removeUserWarningText", base::string16()); - builder->AddF("removeSupervisedUserWarningText", - IDS_LOGIN_POD_SUPERVISED_USER_REMOVE_WARNING, + builder->AddF("removeLegacySupervisedUserWarningText", + IDS_LOGIN_POD_LEGACY_SUPERVISED_USER_REMOVE_WARNING, base::UTF8ToUTF16(chrome::kSupervisedUserManagementDisplayURL)); builder->Add("removeUserWarningButtonTitle", IDS_LOGIN_POD_USER_REMOVE_WARNING_BUTTON); diff --git a/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc b/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc index 46ad3397..0d953118 100644 --- a/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc +++ b/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc @@ -58,7 +58,7 @@ const char kKeyDisplayName[]= "displayName"; const char kKeyEmailAddress[] = "emailAddress"; const char kKeyProfilePath[] = "profilePath"; const char kKeyPublicAccount[] = "publicAccount"; -const char kKeySupervisedUser[] = "supervisedUser"; +const char kKeyLegacySupervisedUser[] = "legacySupervisedUser"; const char kKeyChildUser[] = "childUser"; const char kKeyCanRemove[] = "canRemove"; const char kKeyIsOwner[] = "isOwner"; @@ -641,9 +641,9 @@ void UserManagerScreenHandler::GetLocalizedValues( l10n_util::GetStringUTF16(IDS_LOGIN_POD_USER_REMOVE_WARNING_BUTTON)); localized_strings->SetString("removeUserWarningText", l10n_util::GetStringUTF16(IDS_LOGIN_POD_USER_REMOVE_WARNING)); - localized_strings->SetString("removeSupervisedUserWarningText", + localized_strings->SetString("removeLegacySupervisedUserWarningText", l10n_util::GetStringFUTF16( - IDS_LOGIN_POD_SUPERVISED_USER_REMOVE_WARNING, + IDS_LOGIN_POD_LEGACY_SUPERVISED_USER_REMOVE_WARNING, base::UTF8ToUTF16(chrome::kSupervisedUserManagementDisplayURL))); // Strings needed for the User Manager tutorial slides. @@ -727,8 +727,8 @@ void UserManagerScreenHandler::SendUserList() { profile_value->Set( kKeyProfilePath, base::CreateFilePathValue(profile_path)); profile_value->SetBoolean(kKeyPublicAccount, false); - profile_value->SetBoolean( - kKeySupervisedUser, info_cache.ProfileIsLegacySupervisedAtIndex(i)); + profile_value->SetBoolean(kKeyLegacySupervisedUser, + info_cache.ProfileIsLegacySupervisedAtIndex(i)); profile_value->SetBoolean( kKeyChildUser, info_cache.ProfileIsChildAtIndex(i)); profile_value->SetBoolean( diff --git a/ui/login/account_picker/user_pod_row.css b/ui/login/account_picker/user_pod_row.css index b1e0b36..10b2170 100644 --- a/ui/login/account_picker/user_pod_row.css +++ b/ui/login/account_picker/user_pod_row.css @@ -426,8 +426,8 @@ html[dir=rtl] .user-type-icon-area { width: 16px; } -.user-type-icon-area.supervised .user-type-icon-image { - background-image: url(chrome://theme/IDR_SUPERVISED_USER_ICON); +.user-type-icon-area.legacySupervised .user-type-icon-image { + background-image: url(chrome://theme/IDR_LEGACY_SUPERVISED_USER_ICON); } .user-type-icon-area.child .user-type-icon-image { @@ -522,7 +522,7 @@ html[dir=rtl] .action-box-area.active ~ .action-box-menu { } .action-box-remove-user-warning-text, -.action-box-remove-supervised-user-warning-text { +.action-box-remove-legacy-supervised-user-warning-text { padding-bottom: 20px; } diff --git a/ui/login/account_picker/user_pod_row.js b/ui/login/account_picker/user_pod_row.js index 0f4a274..0ebd81f 100644 --- a/ui/login/account_picker/user_pod_row.js +++ b/ui/login/account_picker/user_pod_row.js @@ -954,12 +954,12 @@ cr.define('login', function() { }, /** - * Gets action box menu, remove supervised user warning text div. + * Gets action box menu, remove legacy supervised user warning text div. * @type {!HTMLInputElement} */ - get actionBoxRemoveSupervisedUserWarningTextElement() { + get actionBoxRemoveLegacySupervisedUserWarningTextElement() { return this.querySelector( - '.action-box-remove-supervised-user-warning-text'); + '.action-box-remove-legacy-supervised-user-warning-text'); }, /** @@ -1035,8 +1035,8 @@ cr.define('login', function() { customizeUserPodPerUserType: function() { if (this.user_.childUser && !this.user_.isDesktopUser) { this.setUserPodIconType('child'); - } else if (this.user_.supervisedUser && !this.user_.isDesktopUser) { - this.setUserPodIconType('supervised'); + } else if (this.user_.legacySupervisedUser && !this.user_.isDesktopUser) { + this.setUserPodIconType('legacySupervised'); } else if (this.multiProfilesPolicyApplied) { // Mark user pod as not focusable which in addition to the grayed out // filter makes it look in disabled state. @@ -1387,7 +1387,7 @@ cr.define('login', function() { * @param {Event} e Click event. */ handleRemoveCommandClick_: function(e) { - if (this.user.supervisedUser || this.user.isDesktopUser) { + if (this.user.legacySupervisedUser || this.user.isDesktopUser) { this.showRemoveWarning_(); return; } @@ -1396,8 +1396,8 @@ cr.define('login', function() { }, /** - * Shows remove user warning. Used for supervised users on CrOS, and for all - * users on desktop. + * Shows remove user warning. Used for legacy supervised users on CrOS, and + * for all users on desktop. */ showRemoveWarning_: function() { this.actionBoxMenuRemoveElement.hidden = true; @@ -1455,7 +1455,7 @@ cr.define('login', function() { return; switch (e.keyIdentifier) { case 'Enter': - if (this.user.supervisedUser || this.user.isDesktopUser) { + if (this.user.legacySupervisedUser || this.user.isDesktopUser) { // Prevent default so that we don't trigger a 'click' event on the // remove button that will be focused. e.preventDefault(); @@ -1931,7 +1931,7 @@ cr.define('login', function() { this.nameElement.textContent = this.user.displayName; var isLockedUser = this.user.needsSignin; - var isLegacySupervisedUser = this.user.supervisedUser; + var isLegacySupervisedUser = this.user.legacySupervisedUser; var isChildUser = this.user.childUser; this.classList.toggle('locked', isLockedUser); this.classList.toggle('legacy-supervised', isLegacySupervisedUser); @@ -1942,7 +1942,7 @@ cr.define('login', function() { this.actionBoxRemoveUserWarningTextElement.hidden = isLegacySupervisedUser; - this.actionBoxRemoveSupervisedUserWarningTextElement.hidden = + this.actionBoxRemoveLegacySupervisedUserWarningTextElement.hidden = !isLegacySupervisedUser; this.passwordElement.setAttribute('aria-label', loadTimeData.getStringF( diff --git a/ui/login/account_picker/user_pod_template.html b/ui/login/account_picker/user_pod_template.html index 406e0ae..0767863 100644 --- a/ui/login/account_picker/user_pod_template.html +++ b/ui/login/account_picker/user_pod_template.html @@ -5,7 +5,7 @@ </div> <div class="signed-in-indicator" i18n-content="signedIn"></div> <div class="indicator-container"> - <div class="indicator supervised-indicator"></div> + <div class="indicator legacy-supervised-indicator"></div> <div class="indicator child-indicator"></div> <div class="indicator locked-indicator"></div> </div> @@ -64,8 +64,8 @@ <div class="action-box-remove-user-warning" hidden> <div class="action-box-remove-user-warning-text" i18n-content="removeUserWarningText" hidden></div> - <div class="action-box-remove-supervised-user-warning-text" - i18n-content="removeSupervisedUserWarningText"></div> + <div class="action-box-remove-legacy-supervised-user-warning-text" + i18n-content="removeLegacySupervisedUserWarningText"></div> <button class="remove-warning-button custom-appearance button-fancy button-red" i18n-content="removeUserWarningButtonTitle"></button> |