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

Unified Diff: ports/devenv/mounter.js

Issue 1415743013: Run jshint over all JavaScript files (Closed) Base URL: https://chromium.googlesource.com/external/naclports.git@repo_conf
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ports/devenv/devenvwidget/devenvwidget.js ('k') | ports/devenv/tests/common.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ports/devenv/mounter.js
diff --git a/ports/devenv/mounter.js b/ports/devenv/mounter.js
index f67d83c808f0152c917c211e9140bd6181326806..e601d5392166460f861ac29574969faf24a9e1f6 100644
--- a/ports/devenv/mounter.js
+++ b/ports/devenv/mounter.js
@@ -4,6 +4,8 @@
* found in the LICENSE file.
*/
+/* globals g_mount */
+
'use strict';
// TODO(gdeepti): Clean up global variables.
@@ -44,7 +46,7 @@ function grabFocus() {
}
element.setAttribute('tabIndex', '-1');
return true;
- })
+ });
}
function releaseFocus() {
@@ -59,7 +61,7 @@ function releaseFocus() {
element.removeAttribute('tabIndex');
}
return true;
- })
+ });
mounterClient.terminal.focus();
}
@@ -67,14 +69,14 @@ function sizeBackground() {
mounterBackground.style.height = intToPixels(window.innerHeight);
var bgTop = 0;
if (!isVisible)
- bgTop = 10 - window.innerHeight
+ bgTop = 10 - window.innerHeight;
mounterBackground.style.top = intToPixels(bgTop);
}
function changeVisibility(visible) {
isVisible = visible;
- sizeBackground()
+ sizeBackground();
if (!mounterClient)
return;
@@ -99,12 +101,12 @@ function mounterClicked(event) {
event.stopPropagation();
}
-function initMounterclient(mount, chooseFolder,
+function MounterClient(mount, chooseFolder,
mountHandler, unmountHandler, terminal) {
this.mount = mount;
this.onChooseFolder = chooseFolder;
this.onMount = mountHandler;
- this.onUnmount = unmountHandler
+ this.onUnmount = unmountHandler;
this.terminal = terminal;
}
@@ -123,7 +125,7 @@ function populateMountControl(mountControl) {
mountControl.selectButton.disabled = g_mount.mounted;
mountControl.mountButton.disabled =
(g_mount.mounted ||
- (g_mount.entry == null));
+ (g_mount.entry === null));
mountControl.unmountButton.disabled = !g_mount.mounted;
}
@@ -206,7 +208,7 @@ function addMountControl(mount, init) {
init(function() {
populateMountControl(mountControl);
});
- mounter.appendChild(mountControl);
+ window.mounter.appendChild(mountControl);
return mountControl;
}
@@ -221,7 +223,5 @@ function initMounter(makeVisible, aMounterClient, init) {
addMountControl(g_mount, init);
changeVisibility(makeVisible);
- window.onresize = function() {
- sizeBackground();
- }
+ window.onresize = sizeBackground;
}
« no previous file with comments | « ports/devenv/devenvwidget/devenvwidget.js ('k') | ports/devenv/tests/common.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698