Commit fbd14be4 authored by Timothy Loh's avatar Timothy Loh Committed by Commit Bot

Plugin VM installer: Notify AX system when text changes

This CL updates the Plugin VM installer so that ChromeVox users can get
updates to the labels (title, message, download progress and time left).

Bug: 1021414
Change-Id: I4e80b95ceb232bb68327ee296da07054a2464aea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1935295Reviewed-by: default avatarChris Hall <chrishall@chromium.org>
Commit-Queue: Timothy Loh <timloh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#719039}
parent b0dd8238
......@@ -17,6 +17,7 @@
#include "chrome/grit/chrome_unscaled_resources.h"
#include "chrome/grit/generated_resources.h"
#include "content/public/browser/browser_thread.h"
#include "ui/accessibility/ax_enums.mojom.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/l10n/time_format.h"
#include "ui/base/resource/resource_bundle.h"
......@@ -275,6 +276,8 @@ void PluginVmLauncherView::OnDownloadProgressUpdated(
download_progress_message_label_->SetText(
GetDownloadProgressMessage(bytes_downloaded, content_length));
download_progress_message_label_->NotifyAccessibilityEvent(
ax::mojom::Event::kTextChanged, true);
UpdateOperationProgress(bytes_downloaded, content_length, elapsed_time);
}
......@@ -495,16 +498,22 @@ void PluginVmLauncherView::UpdateOperationProgress(
time_left_message_label_->SetText(
ui::TimeFormat::Simple(ui::TimeFormat::FORMAT_REMAINING,
ui::TimeFormat::LENGTH_SHORT, remaining));
time_left_message_label_->NotifyAccessibilityEvent(
ax::mojom::Event::kTextChanged, true);
}
void PluginVmLauncherView::SetBigMessageLabel() {
big_message_label_->SetText(GetBigMessage());
big_message_label_->SetVisible(true);
big_message_label_->NotifyAccessibilityEvent(ax::mojom::Event::kTextChanged,
true);
}
void PluginVmLauncherView::SetMessageLabel() {
message_label_->SetText(GetMessage());
message_label_->SetVisible(true);
message_label_->NotifyAccessibilityEvent(ax::mojom::Event::kTextChanged,
true);
}
void PluginVmLauncherView::SetBigImage() {
......
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