Commit 224af1f6 authored by mgiuca's avatar mgiuca Committed by Commit bot

App list: Changed launcher button's tooltip to "Launcher" in Ares mode.

BUG=448644

Review URL: https://codereview.chromium.org/853643002

Cr-Commit-Position: refs/heads/master@{#313836}
parent 2c7050c2
......@@ -170,6 +170,12 @@ This file contains the strings for ash.
<message name="IDS_ASH_SHELF_APP_LIST_SYNCING_TITLE" desc="The title used for the Ash App List in the Shelf to indicate loading/syncing apps.">
Syncing apps...
</message>
<message name="IDS_ASH_SHELF_APP_LIST_LAUNCHER_TITLE" desc="The title used for the Ash Launcher in the Shelf (not mentioning 'Apps' since this is a general launcher).">
Launcher
</message>
<message name="IDS_ASH_SHELF_APP_LIST_LAUNCHER_SYNCING_TITLE" desc="The title used for the Ash Launcher in the Shelf to indicate loading/syncinc apps.">
Launcher (syncing apps...)
</message>
<message name="IDS_ASH_SHELF_OVERFLOW_NAME" desc="The title used for the Ash overflow button in the shelf">
Overflow Button
</message>
......
......@@ -15,6 +15,7 @@
#include "grit/ash_resources.h"
#include "grit/ash_strings.h"
#include "ui/accessibility/ax_view_state.h"
#include "ui/app_list/app_list_switches.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_switches_util.h"
......@@ -39,7 +40,10 @@ AppListButton::AppListButton(views::ButtonListener* listener,
draw_background_as_active_(false),
host_(host),
shelf_widget_(shelf_widget) {
SetAccessibleName(l10n_util::GetStringUTF16(IDS_ASH_SHELF_APP_LIST_TITLE));
SetAccessibleName(
app_list::switches::IsExperimentalAppListEnabled()
? l10n_util::GetStringUTF16(IDS_ASH_SHELF_APP_LIST_LAUNCHER_TITLE)
: l10n_util::GetStringUTF16(IDS_ASH_SHELF_APP_LIST_TITLE));
SetSize(gfx::Size(kShelfSize, kShelfSize));
SetFocusPainter(views::Painter::CreateSolidFocusPainter(
kFocusBorderColor, gfx::Insets(1, 1, 1, 1)));
......
......@@ -8,6 +8,7 @@
#include "ash/shell.h"
#include "ash/shell_delegate.h"
#include "grit/ash_strings.h"
#include "ui/app_list/app_list_switches.h"
#include "ui/base/l10n/l10n_util.h"
namespace ash {
......@@ -31,9 +32,17 @@ bool AppListShelfItemDelegate::ItemSelected(const ui::Event& event) {
base::string16 AppListShelfItemDelegate::GetTitle() {
ShelfModel* model = Shell::GetInstance()->shelf_model();
DCHECK(model);
return model->status() == ShelfModel::STATUS_LOADING ?
l10n_util::GetStringUTF16(IDS_ASH_SHELF_APP_LIST_SYNCING_TITLE) :
l10n_util::GetStringUTF16(IDS_ASH_SHELF_APP_LIST_TITLE);
int title_id;
if (app_list::switches::IsExperimentalAppListEnabled()) {
title_id = model->status() == ShelfModel::STATUS_LOADING
? IDS_ASH_SHELF_APP_LIST_LAUNCHER_SYNCING_TITLE
: IDS_ASH_SHELF_APP_LIST_LAUNCHER_TITLE;
} else {
title_id = model->status() == ShelfModel::STATUS_LOADING
? IDS_ASH_SHELF_APP_LIST_SYNCING_TITLE
: IDS_ASH_SHELF_APP_LIST_TITLE;
}
return l10n_util::GetStringUTF16(title_id);
}
ui::MenuModel* AppListShelfItemDelegate::CreateContextMenu(
......
......@@ -295,7 +295,10 @@ IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, FocusShelf) {
EnableChromeVox();
EXPECT_TRUE(PerformAcceleratorAction(ash::FOCUS_SHELF));
EXPECT_EQ("Shelf toolbar Apps Button", speech_monitor_.GetNextUtterance());
const char* expected = app_list::switches::IsExperimentalAppListEnabled()
? "Shelf toolbar Launcher Button"
: "Shelf toolbar Apps Button";
EXPECT_EQ(expected, speech_monitor_.GetNextUtterance());
SendKeyPress(ui::VKEY_TAB);
EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(), "* Button"));
......@@ -322,7 +325,7 @@ IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, NavigateAppLauncher) {
// check this in the classic app launcher.
if (!app_list::switches::IsExperimentalAppListEnabled()) {
SendKeyPress(ui::VKEY_DOWN);
EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(), "* Button"));
EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(), "* Button"));
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment