OLD | NEW |
1 // Copyright 2014 The ChromeOS IME Authors. All Rights Reserved. | 1 // Copyright 2014 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.inputview.ReadyState'); | 14 goog.provide('i18n.input.chrome.inputview.ReadyState'); |
15 | 15 |
16 | 16 |
17 | 17 |
18 goog.scope(function() { | 18 goog.scope(function() { |
| 19 |
| 20 |
| 21 |
19 /** | 22 /** |
20 * The system ready state which mainains a state bit map. | 23 * The system ready state which mainains a state bit map. |
21 * Inputview controller uses this to determine whether the system is ready to | 24 * Inputview controller uses this to determine whether the system is ready to |
22 * render the UI. | 25 * render the UI. |
23 * | 26 * |
24 * @constructor | 27 * @constructor |
25 */ | 28 */ |
26 i18n.input.chrome.inputview.ReadyState = function() { | 29 i18n.input.chrome.inputview.ReadyState = function() { |
27 }; | 30 }; |
28 var ReadyState = i18n.input.chrome.inputview.ReadyState; | 31 var ReadyState = i18n.input.chrome.inputview.ReadyState; |
29 | 32 |
30 | 33 |
31 /** | 34 /** |
32 * The state type. | 35 * The state type. |
33 * | 36 * |
34 * @enum {number} | 37 * @enum {number} |
35 */ | 38 */ |
36 ReadyState.StateType = { | 39 ReadyState.StateType = { |
37 IME_LIST_READY: 1, | 40 IME_LIST_READY: 0x1, |
38 KEYBOARD_CONFIG_READY: 2, | 41 KEYBOARD_CONFIG_READY: 0x10, |
39 LAYOUT_READY: 4, | 42 LAYOUT_READY: 0x100, |
40 LAYOUT_CONFIG_READY: 8, | 43 LAYOUT_CONFIG_READY: 0x1000, |
41 M17N_LAYOUT_READY: 16 | 44 M17N_LAYOUT_READY: 0x10000, |
| 45 INPUT_METHOD_CONFIG_READY: 0x100000 |
42 }; | 46 }; |
43 | 47 |
44 | 48 |
45 /** | 49 /** |
46 * The internal ready state bit map. | 50 * The internal ready state bit map. |
47 * | 51 * |
48 * @private {number} | 52 * @private {number} |
49 */ | 53 */ |
50 ReadyState.prototype.state_ = 0; | 54 ReadyState.prototype.state_ = 0; |
51 | 55 |
(...skipping 26 matching lines...) Expand all Loading... |
78 | 82 |
79 /** | 83 /** |
80 * Sets state ready for the given state type. | 84 * Sets state ready for the given state type. |
81 * | 85 * |
82 * @param {ReadyState.StateType} stateType . | 86 * @param {ReadyState.StateType} stateType . |
83 */ | 87 */ |
84 ReadyState.prototype.markStateReady = function(stateType) { | 88 ReadyState.prototype.markStateReady = function(stateType) { |
85 this.state_ |= stateType; | 89 this.state_ |= stateType; |
86 }; | 90 }; |
87 }); // goog.scope | 91 }); // goog.scope |
OLD | NEW |