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 * @fileoverview Initializes the injected content script. | 6 * @fileoverview Initializes the injected content script. |
7 * | 7 * |
8 */ | 8 */ |
9 | 9 |
10 goog.provide('cvox.InitGlobals'); | 10 goog.provide('cvox.InitGlobals'); |
(...skipping 27 matching lines...) Expand all Loading... |
38 .add(cvox.HostFactory.getTts()) | 38 .add(cvox.HostFactory.getTts()) |
39 .add(cvox.History.getInstance()) | 39 .add(cvox.History.getInstance()) |
40 .add(cvox.ConsoleTts.getInstance()); | 40 .add(cvox.ConsoleTts.getInstance()); |
41 | 41 |
42 if (!cvox.ChromeVox.braille) { | 42 if (!cvox.ChromeVox.braille) { |
43 cvox.ChromeVox.braille = cvox.HostFactory.getBraille(); | 43 cvox.ChromeVox.braille = cvox.HostFactory.getBraille(); |
44 } | 44 } |
45 cvox.ChromeVox.mathJax = cvox.HostFactory.getMathJax(); | 45 cvox.ChromeVox.mathJax = cvox.HostFactory.getMathJax(); |
46 | 46 |
47 cvox.ChromeVox.earcons = cvox.HostFactory.getEarcons(); | 47 cvox.ChromeVox.earcons = cvox.HostFactory.getEarcons(); |
48 cvox.ChromeVox.msgs = new cvox.Msgs(); | |
49 cvox.ChromeVox.isActive = true; | 48 cvox.ChromeVox.isActive = true; |
50 cvox.ChromeVox.navigationManager = new cvox.NavigationManager(); | 49 cvox.ChromeVox.navigationManager = new cvox.NavigationManager(); |
51 cvox.ChromeVox.navigationManager.updateIndicator(); | 50 cvox.ChromeVox.navigationManager.updateIndicator(); |
52 cvox.ChromeVox.syncToNode = cvox.ApiImplementation.syncToNode; | 51 cvox.ChromeVox.syncToNode = cvox.ApiImplementation.syncToNode; |
53 cvox.ChromeVox.speakNode = cvox.ApiImplementation.speakNode; | 52 cvox.ChromeVox.speakNode = cvox.ApiImplementation.speakNode; |
54 | 53 |
55 cvox.ChromeVox.serializer = new cvox.Serializer(); | 54 cvox.ChromeVox.serializer = new cvox.Serializer(); |
56 | 55 |
57 // Do platform specific initialization here. | 56 // Do platform specific initialization here. |
58 cvox.ChromeVox.host.init(); | 57 cvox.ChromeVox.host.init(); |
59 | 58 |
60 // Start the event watchers | 59 // Start the event watchers |
61 cvox.ChromeVoxEventWatcher.init(window); | 60 cvox.ChromeVoxEventWatcher.init(window); |
62 | 61 |
63 // Provide a way for modules that can't depend on cvox.ChromeVoxUserCommands | 62 // Provide a way for modules that can't depend on cvox.ChromeVoxUserCommands |
64 // to execute commands. | 63 // to execute commands. |
65 cvox.ChromeVox.executeUserCommand = function(commandName) { | 64 cvox.ChromeVox.executeUserCommand = function(commandName) { |
66 cvox.ChromeVoxUserCommands.commands[commandName](); | 65 cvox.ChromeVoxUserCommands.commands[commandName](); |
67 }; | 66 }; |
68 | 67 |
69 cvox.ChromeVox.host.onPageLoad(); | 68 cvox.ChromeVox.host.onPageLoad(); |
70 }; | 69 }; |
OLD | NEW |