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 e7d549c977d49861cfa998eabd32acf19ed72553..a80ec1ebae9ddba6946ccaee87c60c0fc0c2a230 100644 |
--- a/chrome/browser/resources/gaia_auth_host/authenticator.js |
+++ b/chrome/browser/resources/gaia_auth_host/authenticator.js |
@@ -91,6 +91,7 @@ cr.define('cr.login', function() { |
this.reloadUrl_ = null; |
this.trusted_ = true; |
+ this.webview_.addEventListener('drop', this.onDrop_.bind(this)); |
this.webview_.addEventListener( |
'newwindow', this.onNewWindow_.bind(this)); |
this.webview_.addEventListener( |
@@ -334,6 +335,16 @@ cr.define('cr.login', function() { |
}; |
/** |
+ * Invoked at the drop phase of a drag-and-drop operation on the webview. |
+ * @private |
+ */ |
+ Authenticator.prototype.onDrop_ = function(e) { |
+ var url = e.dataTransfer.getData('url'); |
+ if (url) |
+ this.dispatchEvent(new CustomEvent('dropLink', {detail: url})); |
+ }; |
+ |
+ /** |
* Invoked when the webview attempts to open a new window. |
* @private |
*/ |