diff options
author | arv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-13 23:47:06 +0000 |
---|---|---|
committer | arv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-13 23:47:06 +0000 |
commit | 3ed462685a542d3a9625d8fa24a5755a283530ae (patch) | |
tree | 72b60d41d6294059527a5120df595eb7c73f48ab /chrome/browser/resources/ntp/most_visited.js | |
parent | baa88b42ff4fe68d8bd096b2c4c28a4ebdac6910 (diff) | |
download | chromium_src-3ed462685a542d3a9625d8fa24a5755a283530ae.zip chromium_src-3ed462685a542d3a9625d8fa24a5755a283530ae.tar.gz chromium_src-3ed462685a542d3a9625d8fa24a5755a283530ae.tar.bz2 |
DOMUI etc. Use the built in bind method of Function now that V8 supports it.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/3308030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59303 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources/ntp/most_visited.js')
-rw-r--r-- | chrome/browser/resources/ntp/most_visited.js | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/chrome/browser/resources/ntp/most_visited.js b/chrome/browser/resources/ntp/most_visited.js index bff2c1f..5b024b2 100644 --- a/chrome/browser/resources/ntp/most_visited.js +++ b/chrome/browser/resources/ntp/most_visited.js @@ -50,25 +50,25 @@ var MostVisited = (function() { this.createThumbnails_(); this.applyMostVisitedRects_(); - el.addEventListener('click', bind(this.handleClick_, this)); - el.addEventListener('keydown', bind(this.handleKeyDown_, this)); + el.addEventListener('click', this.handleClick_.bind(this)); + el.addEventListener('keydown', this.handleKeyDown_.bind(this)); document.addEventListener('DOMContentLoaded', - bind(this.ensureSmallGridCorrect, this)); + this.ensureSmallGridCorrect.bind(this)); // Commands - document.addEventListener('command', bind(this.handleCommand_, this)); - document.addEventListener('canExecute', bind(this.handleCanExecute_, this)); + document.addEventListener('command', this.handleCommand_.bind(this)); + document.addEventListener('canExecute', this.handleCanExecute_.bind(this)); // DND - el.addEventListener('dragstart', bind(this.handleDragStart_, this)); - el.addEventListener('dragenter', bind(this.handleDragEnter_, this)); - el.addEventListener('dragover', bind(this.handleDragOver_, this)); - el.addEventListener('dragleave', bind(this.handleDragLeave_, this)); - el.addEventListener('drop', bind(this.handleDrop_, this)); - el.addEventListener('dragend', bind(this.handleDragEnd_, this)); - el.addEventListener('drag', bind(this.handleDrag_, this)); - el.addEventListener('mousedown', bind(this.handleMouseDown_, this)); + el.addEventListener('dragstart', this.handleDragStart_.bind(this)); + el.addEventListener('dragenter', this.handleDragEnter_.bind(this)); + el.addEventListener('dragover', this.handleDragOver_.bind(this)); + el.addEventListener('dragleave', this.handleDragLeave_.bind(this)); + el.addEventListener('drop', this.handleDrop_.bind(this)); + el.addEventListener('dragend', this.handleDragEnd_.bind(this)); + el.addEventListener('drag', this.handleDrag_.bind(this)); + el.addEventListener('mousedown', this.handleMouseDown_.bind(this)); } MostVisited.prototype = { @@ -418,10 +418,10 @@ var MostVisited = (function() { // The timeout below is to allow WebKit to see that we turned off // pointer-event before moving the thumbnails so that we can get out of // hover mode. - window.setTimeout(bind(function() { + window.setTimeout((function() { this.invalidate_(); this.layout(); - }, this), 10); + }).bind(this), 10); e.preventDefault(); if (this.dragEndTimer_) { window.clearTimeout(this.dragEndTimer_); |