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

Side by Side Diff: chrome/browser/resources/ntp4/page_list_view.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: Whoops - send message to class, not metaclass. 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 PageListView implementation. 6 * @fileoverview PageListView implementation.
7 * PageListView manages page list, dot list, switcher buttons and handles apps 7 * PageListView manages page list, dot list, switcher buttons and handles apps
8 * pages callbacks from backend. 8 * pages callbacks from backend.
9 * 9 *
10 * Note that you need to have AppLauncherHandler in your WebUI to use this code. 10 * Note that you need to have AppLauncherHandler in your WebUI to use this code.
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 e.preventDefault(); 174 e.preventDefault();
175 }, true); 175 }, true);
176 176
177 this.tilePages = this.pageList.getElementsByClassName('tile-page'); 177 this.tilePages = this.pageList.getElementsByClassName('tile-page');
178 this.appsPages = this.pageList.getElementsByClassName('apps-page'); 178 this.appsPages = this.pageList.getElementsByClassName('apps-page');
179 179
180 // Initialize the cardSlider without any cards at the moment 180 // Initialize the cardSlider without any cards at the moment
181 this.sliderFrame = cardSliderFrame; 181 this.sliderFrame = cardSliderFrame;
182 this.cardSlider = new cr.ui.CardSlider(this.sliderFrame, this.pageList, 182 this.cardSlider = new cr.ui.CardSlider(this.sliderFrame, this.pageList,
183 this.sliderFrame.offsetWidth); 183 this.sliderFrame.offsetWidth);
184 this.cardSlider.initialize(); 184 this.cardSlider.initialize(
185 templateData.isSwipeTrackingFromScrollEventsEnabled);
185 186
186 // Handle events from the card slider. 187 // Handle events from the card slider.
187 this.pageList.addEventListener('cardSlider:card_changed', 188 this.pageList.addEventListener('cardSlider:card_changed',
188 this.onCardChanged_.bind(this)); 189 this.onCardChanged_.bind(this));
189 this.pageList.addEventListener('cardSlider:card_added', 190 this.pageList.addEventListener('cardSlider:card_added',
190 this.onCardAdded_.bind(this)); 191 this.onCardAdded_.bind(this));
191 this.pageList.addEventListener('cardSlider:card_removed', 192 this.pageList.addEventListener('cardSlider:card_removed',
192 this.onCardRemoved_.bind(this)); 193 this.onCardRemoved_.bind(this));
193 194
194 // Ensure the slider is resized appropriately with the window 195 // Ensure the slider is resized appropriately with the window
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 if (page.navigationDot) 722 if (page.navigationDot)
722 page.navigationDot.remove(opt_animate); 723 page.navigationDot.remove(opt_animate);
723 this.cardSlider.removeCard(page); 724 this.cardSlider.removeCard(page);
724 }, 725 },
725 }; 726 };
726 727
727 return { 728 return {
728 PageListView: PageListView 729 PageListView: PageListView
729 }; 730 };
730 }); 731 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698