Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(751)

Side by Side Diff: components/translate/ios/browser/resources/translate_ios.js

Issue 2449333002: [ios] Pass more --jscomp_error switches to the closure Compiler. (Closed)
Patch Set: Added back @public Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 __gCrWeb['translate'] = {}; 5 /**
6 * @fileoverview Installs Translate management functions on the __gCrWeb object.
7 *
8 * TODO(crbug.com/659442): Enable checkTypes, checkVars errors for this file.
9 * @suppress {checkTypes, checkVars}
10 */
11
12 __gCrWeb.translate = {};
13
14 // Store translate namespace object in a global __gCrWeb object referenced by a
15 // string, so it does not get renamed by closure compiler during the
16 // minification.
17 __gCrWeb['translate'] = __gCrWeb.translate;
6 18
7 (function() { 19 (function() {
8 /** 20 /**
9 * The delay a wait performed (in milliseconds) before checking whether the 21 * The delay a wait performed (in milliseconds) before checking whether the
10 * translation has finished. 22 * translation has finished.
11 * @type {number} 23 * @type {number}
12 */ 24 */
13 __gCrWeb.translate.TRANSLATE_STATUS_CHECK_DELAY = 400; 25 __gCrWeb.translate.TRANSLATE_STATUS_CHECK_DELAY = 400;
14 26
15 /** 27 /**
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 'originalPageLanguage': cr.googleTranslate.sourceLang, 82 'originalPageLanguage': cr.googleTranslate.sourceLang,
71 'translationTime': cr.googleTranslate.translationTime}); 83 'translationTime': cr.googleTranslate.translationTime});
72 } else { 84 } else {
73 // The translation is still pending, check again later. 85 // The translation is still pending, check again later.
74 window.setTimeout(__gCrWeb.translate.checkTranslateStatus, 86 window.setTimeout(__gCrWeb.translate.checkTranslateStatus,
75 __gCrWeb.translate.TRANSLATE_STATUS_CHECK_DELAY); 87 __gCrWeb.translate.TRANSLATE_STATUS_CHECK_DELAY);
76 } 88 }
77 } 89 }
78 90
79 }()); // anonymous function 91 }()); // anonymous function
OLDNEW
« no previous file with comments | « components/translate/ios/browser/resources/language_detection.js ('k') | ios/web/js_compile.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698