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

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

Issue 9254023: [NTP4] Track the position of each app that's launched. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: key board shortcuts fix, misinterpretation of my own class, :/ Created 8 years, 11 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 | Annotate | Revision Log
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 cr.define('ntp4', function() { 5 cr.define('ntp4', function() {
6 'use strict'; 6 'use strict';
7 7
8 // We can't pass the currently dragging tile via dataTransfer because of 8 // We can't pass the currently dragging tile via dataTransfer because of
9 // http://crbug.com/31037 9 // http://crbug.com/31037
10 var currentlyDraggingTile = null; 10 var currentlyDraggingTile = null;
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 }, 463 },
464 464
465 get tiles() { 465 get tiles() {
466 return this.tileElements_; 466 return this.tileElements_;
467 }, 467 },
468 468
469 get tileCount() { 469 get tileCount() {
470 return this.tileElements_.length; 470 return this.tileElements_.length;
471 }, 471 },
472 472
473 get tileGrid() {
474 return this.tileGrid_;
475 },
476
473 get selected() { 477 get selected() {
474 return Array.prototype.indexOf.call(this.parentNode.children, this) == 478 return Array.prototype.indexOf.call(this.parentNode.children, this) ==
475 ntp4.getCardSlider().currentCard; 479 ntp4.getCardSlider().currentCard;
476 }, 480 },
477 481
482 get layoutValues() {
483 return this.layoutValues_;
484 },
485
478 /** 486 /**
479 * The size of the margin (unused space) on the sides of the tile grid, in 487 * The size of the margin (unused space) on the sides of the tile grid, in
480 * pixels. 488 * pixels.
481 * @type {number} 489 * @type {number}
482 */ 490 */
483 get sideMargin() { 491 get sideMargin() {
484 return this.layoutValues_.leftMargin; 492 return this.layoutValues_.leftMargin;
485 }, 493 },
486 494
487 /** 495 /**
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
1289 assert(false); 1297 assert(false);
1290 }, 1298 },
1291 }; 1299 };
1292 1300
1293 return { 1301 return {
1294 getCurrentlyDraggingTile: getCurrentlyDraggingTile, 1302 getCurrentlyDraggingTile: getCurrentlyDraggingTile,
1295 setCurrentDropEffect: setCurrentDropEffect, 1303 setCurrentDropEffect: setCurrentDropEffect,
1296 TilePage: TilePage, 1304 TilePage: TilePage,
1297 }; 1305 };
1298 }); 1306 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698