OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 | 5 |
6 /** | 6 /** |
7 * @fileoverview Uses ChromeVox API to enhance the search experience. | 7 * @fileoverview Uses ChromeVox API to enhance the search experience. |
8 */ | 8 */ |
9 | 9 |
10 goog.provide('cvox.Search'); | 10 goog.provide('cvox.Search'); |
11 | 11 |
12 goog.require('cvox.ChromeVox'); | 12 goog.require('cvox.ChromeVox'); |
13 goog.require('cvox.SearchConstants'); | 13 goog.require('cvox.SearchConstants'); |
14 goog.require('cvox.SearchResults'); | 14 goog.require('cvox.SearchResults'); |
15 goog.require('cvox.SearchUtil'); | 15 goog.require('cvox.SearchUtil'); |
16 goog.require('cvox.UnknownResult'); | 16 goog.require('cvox.UnknownResult'); |
17 | 17 |
18 /** | 18 /** |
19 * @constructor | 19 * @constructor |
20 */ | 20 */ |
21 cvox.Search = function() { | 21 cvox.Search = function() { |
22 }; | 22 }; |
23 | 23 |
24 /** | 24 /** |
25 * Selectors to match results. | 25 * Selectors to match results. |
26 * @type {Object.<string, string>} | 26 * @type {Object<string, string>} |
27 */ | 27 */ |
28 cvox.Search.selectors = {}; | 28 cvox.Search.selectors = {}; |
29 | 29 |
30 /** | 30 /** |
31 * Selectors for web results. | 31 * Selectors for web results. |
32 */ | 32 */ |
33 cvox.Search.webSelectors = { | 33 cvox.Search.webSelectors = { |
34 /* Topstuff typically contains important messages to be added first. */ | 34 /* Topstuff typically contains important messages to be added first. */ |
35 TOPSTUFF_SELECT: '#topstuff', | 35 TOPSTUFF_SELECT: '#topstuff', |
36 SPELL_SUGG_SELECT: '.ssp', | 36 SPELL_SUGG_SELECT: '.ssp', |
(...skipping 12 matching lines...) Expand all Loading... |
49 }; | 49 }; |
50 | 50 |
51 /** | 51 /** |
52 * Index of the currently synced result. | 52 * Index of the currently synced result. |
53 * @type {number} | 53 * @type {number} |
54 */ | 54 */ |
55 cvox.Search.index; | 55 cvox.Search.index; |
56 | 56 |
57 /** | 57 /** |
58 * Array of the search results. | 58 * Array of the search results. |
59 * @type {Array.<Element>} | 59 * @type {Array<Element>} |
60 */ | 60 */ |
61 cvox.Search.results = []; | 61 cvox.Search.results = []; |
62 | 62 |
63 /** | 63 /** |
64 * Array of the navigation panes. | 64 * Array of the navigation panes. |
65 * @type {Array.<Element>} | 65 * @type {Array<Element>} |
66 */ | 66 */ |
67 cvox.Search.panes = []; | 67 cvox.Search.panes = []; |
68 | 68 |
69 /** | 69 /** |
70 * Index of the currently synced pane. | 70 * Index of the currently synced pane. |
71 * @type {number} | 71 * @type {number} |
72 */ | 72 */ |
73 cvox.Search.paneIndex; | 73 cvox.Search.paneIndex; |
74 | 74 |
75 /** | 75 /** |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 return; | 432 return; |
433 } | 433 } |
434 | 434 |
435 cvox.Search.populateResults(); | 435 cvox.Search.populateResults(); |
436 cvox.Search.populatePanes(); | 436 cvox.Search.populatePanes(); |
437 cvox.Search.paneIndex = cvox.Search.getSelectedPaneIndex(); | 437 cvox.Search.paneIndex = cvox.Search.getSelectedPaneIndex(); |
438 | 438 |
439 cvox.Search.initialSync(); | 439 cvox.Search.initialSync(); |
440 | 440 |
441 }; | 441 }; |
OLD | NEW |