Commit 2d5c5c49 authored by fukino@chromium.org's avatar fukino@chromium.org

Use new operator consistently for constructor-like functions.

Function MainPanelScrollBar() is not a constructor, but it behaves like a constructor.
We can use new consistently for such functions.

BUG=none
TEST=manually

Review URL: https://codereview.chromium.org/484083002

Cr-Commit-Position: refs/heads/master@{#290741}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290741 0039d316-1c4b-4281-b951-d872f2087c98
parent bfab3d02
...@@ -987,7 +987,7 @@ DirectoryTree.prototype.decorate = function( ...@@ -987,7 +987,7 @@ DirectoryTree.prototype.decorate = function(
chrome.fileBrowserPrivate.onDirectoryChanged.addListener( chrome.fileBrowserPrivate.onDirectoryChanged.addListener(
this.privateOnDirectoryChangedBound_); this.privateOnDirectoryChangedBound_);
this.scrollBar_ = MainPanelScrollBar(); this.scrollBar_ = new MainPanelScrollBar();
this.scrollBar_.initialize(this.parentNode, this); this.scrollBar_.initialize(this.parentNode, this);
/** /**
......
...@@ -298,7 +298,7 @@ FileTable.decorate = function(self, metadataCache, volumeManager, fullPage) { ...@@ -298,7 +298,7 @@ FileTable.decorate = function(self, metadataCache, volumeManager, fullPage) {
self.setRenderFunction(self.renderTableRow_.bind(self, self.setRenderFunction(self.renderTableRow_.bind(self,
self.getRenderFunction())); self.getRenderFunction()));
self.scrollBar_ = MainPanelScrollBar(); self.scrollBar_ = new MainPanelScrollBar();
self.scrollBar_.initialize(self, self.list); self.scrollBar_.initialize(self, self.list);
// Keep focus on the file list when clicking on the header. // Keep focus on the file list when clicking on the header.
self.header.addEventListener('mousedown', function(e) { self.header.addEventListener('mousedown', function(e) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment