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

Unified Diff: chrome/browser/resources/ntp4/nav_dot.js

Issue 2164693002: [WebUI] ClosureCompile cr.ui.DragWrapper, create a real handler class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove prototypical lies Created 4 years, 5 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/ntp4/nav_dot.js
diff --git a/chrome/browser/resources/ntp4/nav_dot.js b/chrome/browser/resources/ntp4/nav_dot.js
index 7703f31639d2ce5d8a87286fd7b92d5f2e87178b..98f02785724ae9e6475319780d491bfc5e28570b 100644
--- a/chrome/browser/resources/ntp4/nav_dot.js
+++ b/chrome/browser/resources/ntp4/nav_dot.js
@@ -19,6 +19,7 @@ cr.define('ntp', function() {
* @param {boolean} animate If true, animates into existence.
* @constructor
* @extends {HTMLLIElement}
+ * @implements {cr.ui.DragWrapperDelegate}
*/
function NavDot(page, title, titleIsEditable, animate) {
var dot = cr.doc.createElement('li');
@@ -189,12 +190,7 @@ cr.define('ntp', function() {
return this.page_.shouldAcceptDrag(e);
},
- /**
- * A drag has entered the navigation dot. If the user hovers long enough,
- * we will navigate to the relevant page.
- * @param {Event} e The MouseOver event for the drag.
- * @private
- */
+ /** @override */
doDragEnter: function(e) {
var self = this;
function navPageClearTimeout() {
@@ -206,14 +202,9 @@ cr.define('ntp', function() {
this.doDragOver(e);
},
- /**
- * A dragged element has moved over the navigation dot. Show the correct
- * indicator and prevent default handling so the <input> won't act as a drag
- * target.
- * @param {Event} e The MouseOver event for the drag.
- * @private
- */
+ /** @override */
doDragOver: function(e) {
+ // Prevent default handling so the <input> won't act as a drag target.
e.preventDefault();
if (!this.dragWrapper_.isCurrentDragTarget)
@@ -222,12 +213,7 @@ cr.define('ntp', function() {
this.page_.setDropEffect(e.dataTransfer);
},
- /**
- * A dragged element has been dropped on the navigation dot. Tell the page
- * to append it.
- * @param {Event} e The MouseOver event for the drag.
- * @private
- */
+ /** @override */
doDrop: function(e) {
e.stopPropagation();
var tile = ntp.getCurrentlyDraggingTile();
@@ -238,11 +224,7 @@ cr.define('ntp', function() {
this.cancelDelayedSwitch_();
},
- /**
- * The drag has left the navigation dot.
- * @param {Event} e The MouseOver event for the drag.
- * @private
- */
+ /** @override */
doDragLeave: function(e) {
this.cancelDelayedSwitch_();
},

Powered by Google App Engine
This is Rietveld 408576698