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

Side by Side Diff: chrome/browser/resources/ntp4/page_switcher.js

Issue 10092017: Mac: Prevent NTP mousewheel events from being suppressed on Lion. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview Page switcher 6 * @fileoverview Page switcher
7 * This is the class for the left and right navigation arrows that switch 7 * This is the class for the left and right navigation arrows that switch
8 * between pages. 8 * between pages.
9 */ 9 */
10 cr.define('ntp', function() { 10 cr.define('ntp', function() {
11 11
12 function PageSwitcher() { 12 function PageSwitcher() {
13 } 13 }
14 14
15 PageSwitcher.template = { 15 PageSwitcher.template = {
16 __proto__: HTMLButtonElement.prototype, 16 __proto__: HTMLButtonElement.prototype,
17 17
18 decorate: function(el) { 18 decorate: function(el) {
19 el.__proto__ = PageSwitcher.template; 19 el.__proto__ = PageSwitcher.template;
20 20
21 el.addEventListener('click', el.activate_); 21 el.addEventListener('click', el.activate_);
22 el.addEventListener('mousewheel', el.onMouseWheel_); 22 // el.addEventListener('mousewheel', el.onMouseWheel_);
Patrick Dubroy 2012/04/16 21:27:59 This should have a bool value passed in to indicat
23 23
24 el.direction_ = el.id == 'page-switcher-start' ? -1 : 1; 24 el.direction_ = el.id == 'page-switcher-start' ? -1 : 1;
25 25
26 el.dragWrapper_ = new cr.ui.DragWrapper(el, el); 26 el.dragWrapper_ = new cr.ui.DragWrapper(el, el);
27 }, 27 },
28 28
29 /** 29 /**
30 * Activate the switcher (go to the next card). 30 * Activate the switcher (go to the next card).
31 * @private 31 * @private
32 */ 32 */
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 this.dragNavTimeout_ = null; 111 this.dragNavTimeout_ = null;
112 } 112 }
113 }, 113 },
114 114
115 }; 115 };
116 116
117 return { 117 return {
118 initializePageSwitcher: PageSwitcher.template.decorate 118 initializePageSwitcher: PageSwitcher.template.decorate
119 }; 119 };
120 }); 120 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698