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

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

Issue 931033002: <webview>-based Signin Page: Navigate on Drag and Drop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
« no previous file with comments | « no previous file | chrome/browser/resources/inline_login/inline_login.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
*/
« no previous file with comments | « no previous file | chrome/browser/resources/inline_login/inline_login.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698