OLD | NEW |
1 // Copyright 2015 The ChromeOS IME Authors. All Rights Reserved. | 1 // Copyright 2015 The ChromeOS IME Authors. All Rights Reserved. |
2 // limitations under the License. | 2 // limitations under the License. |
3 // See the License for the specific language governing permissions and | 3 // See the License for the specific language governing permissions and |
4 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 4 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
5 // distributed under the License is distributed on an "AS-IS" BASIS, | 5 // distributed under the License is distributed on an "AS-IS" BASIS, |
6 // Unless required by applicable law or agreed to in writing, software | 6 // Unless required by applicable law or agreed to in writing, software |
7 // | 7 // |
8 // http://www.apache.org/licenses/LICENSE-2.0 | 8 // http://www.apache.org/licenses/LICENSE-2.0 |
9 // | 9 // |
10 // You may obtain a copy of the License at | 10 // You may obtain a copy of the License at |
11 // you may not use this file except in compliance with the License. | 11 // you may not use this file except in compliance with the License. |
12 // Licensed under the Apache License, Version 2.0 (the "License"); | 12 // Licensed under the Apache License, Version 2.0 (the "License"); |
13 // | 13 // |
14 goog.provide('i18n.input.chrome.sounds.SoundController'); | 14 goog.provide('i18n.input.chrome.sounds.SoundController'); |
15 | 15 |
16 goog.require('goog.Disposable'); | 16 goog.require('goog.Disposable'); |
17 goog.require('goog.dom'); | 17 goog.require('goog.dom'); |
18 goog.require('i18n.input.chrome.inputview.elements.ElementType'); | 18 goog.require('i18n.input.chrome.ElementType'); |
19 goog.require('i18n.input.chrome.sounds.Sounds'); | 19 goog.require('i18n.input.chrome.sounds.Sounds'); |
20 | 20 |
21 goog.scope(function() { | 21 goog.scope(function() { |
22 var Sounds = i18n.input.chrome.sounds.Sounds; | 22 var Sounds = i18n.input.chrome.sounds.Sounds; |
23 var ElementType = i18n.input.chrome.inputview.elements.ElementType; | 23 var ElementType = i18n.input.chrome.ElementType; |
24 var keyToSoundIdOnKeyUp = {}; | 24 var keyToSoundIdOnKeyUp = {}; |
25 var keyToSoundIdOnKeyRepeat = {}; | 25 var keyToSoundIdOnKeyRepeat = {}; |
26 | 26 |
27 | 27 |
28 | 28 |
29 /** | 29 /** |
30 * Sound controller for the keyboard. | 30 * Sound controller for the keyboard. |
31 * | 31 * |
32 * @param {!boolean} enabled Whether sounds is enabled by default. | 32 * @param {!boolean} enabled Whether sounds is enabled by default. |
33 * @param {?number=} opt_volume The default volume for sound tracks. | 33 * @param {?number=} opt_volume The default volume for sound tracks. |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 } | 244 } |
245 delete this.sounds_[soundId]; | 245 delete this.sounds_[soundId]; |
246 } | 246 } |
247 this.sounds_ = {}; | 247 this.sounds_ = {}; |
248 keyToSoundIdOnKeyUp = {}; | 248 keyToSoundIdOnKeyUp = {}; |
249 keyToSoundIdOnKeyRepeat = {}; | 249 keyToSoundIdOnKeyRepeat = {}; |
250 goog.base(this, 'disposeInternal'); | 250 goog.base(this, 'disposeInternal'); |
251 }; | 251 }; |
252 | 252 |
253 }); // goog.scope | 253 }); // goog.scope |
OLD | NEW |