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

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

Issue 7799015: ntp4: some appearance fixes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 4 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 | « chrome/browser/resources/ntp4/apps_page.css ('k') | chrome/browser/resources/ntp4/drag_wrapper.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/ntp4/apps_page.js
diff --git a/chrome/browser/resources/ntp4/apps_page.js b/chrome/browser/resources/ntp4/apps_page.js
index 0a0c7c89537d85cc68d4d15717b337efe8167a35..a8184b12eba167ae9220660580fb0ab4cbccca5e 100644
--- a/chrome/browser/resources/ntp4/apps_page.js
+++ b/chrome/browser/resources/ntp4/apps_page.js
@@ -227,6 +227,8 @@ cr.define('ntp4', function() {
this.isStore_ = this.appData_.is_webstore;
if (this.isStore_)
this.createAppsPromoExtras_();
+
+ this.addEventListener('mousedown', this.onMousedown_, true);
},
/**
@@ -332,6 +334,19 @@ cr.define('ntp4', function() {
},
/**
+ * Handler for mousedown on the App. Adds a class that allows us to
+ * not display as :active for right clicks (specifically, don't pulse
+ * on right click).
+ * @param {Event} e The mousedown event.
+ */
+ onMousedown_: function(e) {
+ if (e.button == 2)
+ this.classList.add('right-mouse-down');
+ else
+ this.classList.remove('right-mouse-down');
+ },
+
+ /**
* The data and preferences for this app.
* @type {Object}
*/
« no previous file with comments | « chrome/browser/resources/ntp4/apps_page.css ('k') | chrome/browser/resources/ntp4/drag_wrapper.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698