Skip to content

Commit

Permalink
Disable sounds in the virtual keyboard.
Browse files Browse the repository at this point in the history
BUG=368255

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267085 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
rsadam@chromium.org committed Apr 30, 2014
1 parent 37aa383 commit 47de637
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions ui/keyboard/resources/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,9 @@ var RESIZE_THRESHOLD = 20;
* @type {number}
*/
var SOUND_POOL_SIZE = 10;

/**
* Whether or not to enable sounds on key press.
* @type {boolean}
*/
var SOUND_ENABLED = false;
2 changes: 1 addition & 1 deletion ui/keyboard/resources/elements/kb-keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ Polymer('kb-keyboard', {
* @param {Sound} sound The id of the audio tag.
*/
playSound: function(sound) {
if (!sound || sound == Sound.NONE)
if (!SOUND_ENABLED || !sound || sound == Sound.NONE)
return;
var pool = this.sounds[sound];
if (!pool) {
Expand Down

0 comments on commit 47de637

Please sign in to comment.