Commit 56761017 authored by David Tseng's avatar David Tseng Committed by Commit Bot

Add update notes for ChromeVox in m63

Bug: 618099
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I194d9e2ccea2641f7d4685db7d68273e850df53a
Reviewed-on: https://chromium-review.googlesource.com/675587
Commit-Queue: David Tseng <dtseng@chromium.org>
Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#503623}
parent ba36721f
......@@ -140,6 +140,7 @@ chromevox_modules = [
"cvox2/background/live_regions.js",
"cvox2/background/media_automation_handler.js",
"cvox2/background/next_earcons.js",
"cvox2/background/notifications.js",
"cvox2/background/output.js",
"cvox2/background/panel.js",
"cvox2/background/panel_command.js",
......
......@@ -19,6 +19,7 @@ goog.require('FindHandler');
goog.require('LiveRegions');
goog.require('MediaAutomationHandler');
goog.require('NextEarcons');
goog.require('Notifications');
goog.require('Output');
goog.require('Output.EventType');
goog.require('PanelCommand');
......@@ -182,6 +183,8 @@ Background = function() {
buckets: 3
}, // Number of buckets: 0, 1 and overflowing 2.
useNext ? 1 : 0);
Notifications.onStartup();
};
/**
......
......@@ -207,6 +207,7 @@ CommandHandler.onCommand = function(command) {
return false;
case 'showNextUpdatePage':
(new PanelCommand(PanelCommandType.UPDATE_NOTES)).send();
localStorage['notifications_update_notification_shown'] = true;
return false;
case 'darkenScreen':
chrome.accessibilityPrivate.darkenScreen(true);
......
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/**
* @fileoverview Provides notification support for ChromeVox.
*/
goog.provide('Notifications');
goog.require('PanelCommand');
/**
* ChromeVox update notification.
* @constructor
*/
function UpdateNotification() {
this.data = {};
this.data.type = 'basic';
this.data.iconUrl = '/images/chromevox-16.png';
this.data.title = Msgs.getMsg('update_title');
this.data.message = Msgs.getMsg('update_message_new');
}
UpdateNotification.prototype = {
/** @return {boolean} */
shouldShow: function() {
return !localStorage['notifications_update_notification_shown'] &&
chrome.runtime.getManifest().version >= '63' &&
chrome.runtime.getManifest().version < '64';
},
/** Shows the notification. */
show: function() {
if (!this.shouldShow())
return;
chrome.notifications.create('update', this.data);
chrome.notifications.onClicked.addListener(this.onClicked);
chrome.notifications.onClosed.addListener(this.onClosed);
},
/**
* Handles the chrome.notifications event.
* @param {string} notificationId
*/
onClicked: function(notificationId) {
(new PanelCommand(PanelCommandType.TUTORIAL)).send();
},
/**
* Handles the chrome.notifications event.
* @param {string} id
*/
onClosed: function(id) {
localStorage['notifications_update_notification_shown'] = true;
},
/**
* Removes all listeners added by this object.
*/
removeAllListeners: function() {
chrome.notifications.onClicked.removeListener(this.onClicked);
chrome.notifications.onClosed.removeListener(this.onClosed);
}
};
/**
* Set after an update is shown.
* @type {UpdateNotification}
*/
Notifications.currentUpdate;
/**
* Runs notifications that should be shown for startup.
*/
Notifications.onStartup = function() {
// Only run on background page.
if (document.location.href.indexOf('background.html') == -1)
return;
Notifications.currentUpdate = new UpdateNotification();
Notifications.currentUpdate.show();
};
......@@ -159,17 +159,17 @@ Tutorial.prototype = {
delete sessionStorage['tutorial_page_pos'];
this.page = -1;
this.showPage_([
{msgid: 'update_56_title', heading: true},
{msgid: 'update_56_intro'},
{msgid: 'update_63_title', heading: true},
{msgid: 'update_63_intro'},
{
list: true,
items: [
{msgid: 'update_56_item_1', listItem: true},
{msgid: 'update_56_item_2', listItem: true},
{msgid: 'update_56_item_3', listItem: true},
{msgid: 'update_63_item_1', listItem: true},
{msgid: 'update_63_item_2', listItem: true},
{msgid: 'update_63_item_3', listItem: true},
],
},
{msgid: 'update_56_OUTTRO'},
{msgid: 'update_63_OUTTRO'},
]);
},
......
......@@ -2530,6 +2530,12 @@
<message desc="Title displayed in the panel for the menuitem to report an issue." name="IDS_CHROMEVOX_PANEL_MENU_ITEM_REPORT_ISSUE">
Report an issue
</message>
<message desc="Title of a notification that ChromeVox has been updated." name="IDS_CHROMEVOX_UPDATE_TITLE">
ChromeVox Updated
</message>
<message desc="Message text for a notification that ChromeVox has been updated for a new release." name="IDS_CHROMEVOX_UPDATE_MESSAGE_NEW">
Press ChromeVox o, n to find out what's new
</message>
<message desc="Options page description for the command to show ChromeVox's update page." name="IDS_CHROMEVOX_SHOW_NEXT_UPDATE_DESCRIPTION">
Show update notes
</message>
......@@ -2621,23 +2627,23 @@ To open the Chrome browser menu, press Alt+F.
Congratulations! You’ve learned the essentials to use ChromeVox successfully. Remember that you can open the ChromeVox command menu at any time by pressing Search+Period. To learn even more about ChromeVox and Chrome OS, visit the following articles.
If you're done with the tutorial, use ChromeVox to navigate to the Close button and click it.
</message>
<message desc="Part of the ChromeVox update notes for m56, title." name="IDS_CHROMEVOX_UPDATE_56_TITLE">
You've been updated to a major new release of ChromeVox!
<message desc="Part of the ChromeVox update notes for m63, title." name="IDS_CHROMEVOX_UPDATE_63_TITLE">
You've been updated to ChromeVox 63!
</message>
<message desc="Part of the ChromeVox update notes for m56, introductory text." name="IDS_CHROMEVOX_UPDATE_56_INTRO">
We've been hard at work on a new and improved ChromeVox experience; here's what's new
<message desc="Part of the ChromeVox update notes for m63, introductory text." name="IDS_CHROMEVOX_UPDATE_63_INTRO">
We have some exciting changes in this new release; here's what's new:
</message>
<message desc="Part of the ChromeVox update notes for m56, new items 1." name="IDS_CHROMEVOX_UPDATE_56_ITEM_1">
New key bindings. We've made Search the ChromeVox modifier and dramatically simplified the key combinations.
<message desc="Part of the ChromeVox update notes for 63, new items 1." name="IDS_CHROMEVOX_UPDATE_63_ITEM_1">
Classic removed. The keyboard toggle to switch back into ChromeVox Classic has been removed.
</message>
<message desc="Part of the ChromeVox update notes for m56, new items 2." name="IDS_CHROMEVOX_UPDATE_56_ITEM_2">
New earcons. We've refreshed the set of audio icons you hear to make browsing more responsive.
<message desc="Part of the ChromeVox update notes for m63, new items 2." name="IDS_CHROMEVOX_UPDATE_63_ITEM_2">
Rich text support. ChromeVox now supports rich text fields including jump commands, braille cursor routing, selection, and more.
</message>
<message desc="Part of the ChromeVox update notes for m56, new items 3." name="IDS_CHROMEVOX_UPDATE_56_ITEM_3">
Under the hood upgrades. We've revamped how ChromeVox works from the bottom up. Expect better performance, stability, and web support/compliance.
<message desc="Part of the ChromeVox update notes for m63, new items 3." name="IDS_CHROMEVOX_UPDATE_63_ITEM_3">
Android apps for Chrome. If you have Play Store on your device, get a sneak peek at ChromeVox with Android apps. Try the experimental support by downloading Google Chrome Canary from the Play Store.
</message>
<message desc="Part of the ChromeVox update notes for m56, closing paragraph." name="IDS_CHROMEVOX_UPDATE_56_OUTTRO">
We're excited to hear from you on this new experience. Send us feedback directly by pressing Search+a, then i. Press the next button to continue onto the tutorial to learn everything you need to get started.
<message desc="Part of the ChromeVox update notes for m63, closing paragraph." name="IDS_CHROMEVOX_UPDATE_63_OUTTRO">
As always, you can send us feedback directly by pressing Search+a then i. We're eager to hear from you.
</message>
<message desc="Title of an article on the command reference for 'ChromeVox'" name="IDS_CHROMEVOX_NEXT_COMMAND_REFERENCE">
ChromeVox Command Reference
......
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