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

Unified Diff: chrome/browser/resources/options/language_options.js

Issue 559423003: Compile chrome://settings, part 7. 33 errors left (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@H_options_errors_5
Patch Set: Created 6 years, 3 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/options/language_options.js
diff --git a/chrome/browser/resources/options/language_options.js b/chrome/browser/resources/options/language_options.js
index 9b105ca65fb713b3fcf38885af827eeab9d7078d..010f940362524f9b72143e09447cd4927317efe9 100644
--- a/chrome/browser/resources/options/language_options.js
+++ b/chrome/browser/resources/options/language_options.js
@@ -333,10 +333,9 @@ cr.define('options', function() {
var button = document.createElement('button');
button.textContent = loadTimeData.getString('configure');
button.inputMethodId = inputMethod.id;
- button.onclick = function(inputMethodId, e) {
+ button.onclick = (function(inputMethodId, e) {
chrome.send('inputMethodOptionsOpen', [inputMethodId]);
- };
- button.onclick = button.onclick.bind(this, inputMethod.id);
+ }).bind(this, inputMethod.id);
Dan Beam 2014/09/12 03:32:13 why do you need ()?
Vitaly Pavlenko 2014/09/12 19:21:16 Done.
element.appendChild(button);
}
@@ -753,10 +752,9 @@ cr.define('options', function() {
/**
* Updates the language list in the add language overlay.
- * @param {string} languageCode Language code (ex. "fr").
* @private
*/
- updateLanguageListInAddLanguageOverlay_: function(languageCode) {
+ updateLanguageListInAddLanguageOverlay_: function() {
// Change the visibility of the language list in the add language
// overlay. Languages that are already active will become invisible,
// so that users don't add the same language twice.
@@ -830,7 +828,7 @@ cr.define('options', function() {
* @private
*/
handleCheckboxClick_: function(e) {
- var checkbox = e.target;
+ var checkbox = assertInstanceof(e.target, Element);
// Third party IMEs require additional confirmation prior to enabling due
// to privacy risk.
@@ -917,7 +915,7 @@ cr.define('options', function() {
updateEnableSpellCheck_: function(e) {
var value = !$('enable-spell-check').checked;
$('language-options-spell-check-language-button').disabled = value;
- if (!cr.IsMac)
+ if (!cr.isMac)
$('edit-dictionary-button').hidden = value;
},
@@ -1171,10 +1169,17 @@ cr.define('options', function() {
// If this will go as final UI, refactor this to share the component with
// new new tab page.
/**
- * Shows notification
* @private
*/
notificationTimeout_: null,
+
+ /**
+ * Shows notification.
+ * @param {string} text
+ * @param {string} actionText
+ * @param {number=} opt_delay
+ * @private
+ */
showNotification_: function(text, actionText, opt_delay) {
var notificationElement = $('notification');
var actionLink = notificationElement.querySelector('.link-color');

Powered by Google App Engine
This is Rietveld 408576698