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

Unified Diff: chrome/browser/resources/gaia_auth_host/authenticator.js

Issue 945333002: Implement <webview> droplink event (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup_bpe
Patch Set: Created 5 years, 10 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/gaia_auth_host/authenticator.js
diff --git a/chrome/browser/resources/gaia_auth_host/authenticator.js b/chrome/browser/resources/gaia_auth_host/authenticator.js
index 8898e0555238a10c3020e771bfe0b7e3b673f1ab..ac6aed881ee82831b1ca7fac292d4d2d9e41b176 100644
--- a/chrome/browser/resources/gaia_auth_host/authenticator.js
+++ b/chrome/browser/resources/gaia_auth_host/authenticator.js
@@ -91,7 +91,7 @@ cr.define('cr.login', function() {
this.reloadUrl_ = null;
this.trusted_ = true;
- this.webview_.addEventListener('drop', this.onDrop_.bind(this));
+ this.webview_.addEventListener('droplink', this.onDropLink_.bind(this));
this.webview_.addEventListener(
'newwindow', this.onNewWindow_.bind(this));
this.webview_.addEventListener(
@@ -335,13 +335,11 @@ cr.define('cr.login', function() {
};
/**
- * Invoked at the drop phase of a drag-and-drop operation on the webview.
+ * Invoked when a link is dropped on the webview.
* @private
*/
- Authenticator.prototype.onDrop_ = function(e) {
- var url = e.dataTransfer.getData('url');
- if (url)
- this.dispatchEvent(new CustomEvent('dropLink', {detail: url}));
+ Authenticator.prototype.onDropLink_ = function(e) {
+ this.dispatchEvent(new CustomEvent('dropLink', {detail: e.url}));
};
/**

Powered by Google App Engine
This is Rietveld 408576698