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

Side by Side Diff: chrome/browser/resources/chromeos/user_images_grid.js

Issue 570503002: Compile chrome://settings, part 6 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@H_options_errors_4
Patch Set: Created 6 years, 3 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 cr.define('options', function() { 5 cr.define('options', function() {
6 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; 6 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel;
7 /** @const */ var Grid = cr.ui.Grid; 7 /** @const */ var Grid = cr.ui.Grid;
8 /** @const */ var GridItem = cr.ui.GridItem; 8 /** @const */ var GridItem = cr.ui.GridItem;
9 /** @const */ var GridSelectionController = cr.ui.GridSelectionController; 9 /** @const */ var GridSelectionController = cr.ui.GridSelectionController;
10 /** @const */ var ListSingleSelectionModel = cr.ui.ListSingleSelectionModel; 10 /** @const */ var ListSingleSelectionModel = cr.ui.ListSingleSelectionModel;
11 11
12 /** 12 /**
13 * Dimensions for camera capture. 13 * Dimensions for camera capture.
14 * @const 14 * @const
15 */ 15 */
16 var CAPTURE_SIZE = { 16 var CAPTURE_SIZE = {
17 height: 480, 17 height: 480,
18 width: 480 18 width: 480
19 }; 19 };
20 20
21 /** 21 /**
22 * Path for internal URLs. 22 * Path for internal URLs.
23 * @const 23 * @const
24 */ 24 */
25 var CHROME_THEME_PATH = 'chrome://theme'; 25 var CHROME_THEME_PATH = 'chrome://theme';
26 26
27 /** 27 /**
28 * Creates a new user images grid item. 28 * Creates a new user images grid item.
29 * @param {{url: string, title: (string|undefined), 29 * @param {Object} imageInfo Object of the following structure:
30 * {url: string, title: (string|undefined),
30 * decorateFn: (!Function|undefined), 31 * decorateFn: (!Function|undefined),
31 * clickHandler: (!Function|undefined)}} imageInfo User image URL, 32 * clickHandler: (!Function|undefined)}. Contains user image URL,
Dan Beam 2014/09/12 03:25:19 why are you making this more loosely typed?
Vitaly Pavlenko 2014/09/12 19:16:22 I previously had issues with line 127:
32 * optional title, decorator callback and click handler. 33 * optional title, decorator callback and click handler.
33 * @constructor 34 * @constructor
34 * @extends {cr.ui.GridItem} 35 * @extends {cr.ui.GridItem}
35 */ 36 */
36 function UserImagesGridItem(imageInfo) { 37 function UserImagesGridItem(imageInfo) {
37 var el = new GridItem(imageInfo); 38 var el = new GridItem(imageInfo);
38 el.__proto__ = UserImagesGridItem.prototype; 39 el.__proto__ = UserImagesGridItem.prototype;
39 return el; 40 return el;
40 } 41 }
41 42
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 UserImagesGrid.ButtonImages = { 643 UserImagesGrid.ButtonImages = {
643 TAKE_PHOTO: 'chrome://theme/IDR_BUTTON_USER_IMAGE_TAKE_PHOTO', 644 TAKE_PHOTO: 'chrome://theme/IDR_BUTTON_USER_IMAGE_TAKE_PHOTO',
644 CHOOSE_FILE: 'chrome://theme/IDR_BUTTON_USER_IMAGE_CHOOSE_FILE', 645 CHOOSE_FILE: 'chrome://theme/IDR_BUTTON_USER_IMAGE_CHOOSE_FILE',
645 PROFILE_PICTURE: 'chrome://theme/IDR_PROFILE_PICTURE_LOADING' 646 PROFILE_PICTURE: 'chrome://theme/IDR_PROFILE_PICTURE_LOADING'
646 }; 647 };
647 648
648 return { 649 return {
649 UserImagesGrid: UserImagesGrid 650 UserImagesGrid: UserImagesGrid
650 }; 651 };
651 }); 652 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698