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

Side by Side Diff: chrome/browser/resources/options/content_settings_exceptions_area.js

Issue 2458453002: [sensors] Add Permission guard to the generic sensor apis.
Patch Set: rebase + blink reformat Created 3 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 cr.define('options.contentSettings', function() { 5 cr.define('options.contentSettings', function() {
6 /** @const */ var ControlledSettingIndicator = 6 /** @const */ var ControlledSettingIndicator =
7 options.ControlledSettingIndicator; 7 options.ControlledSettingIndicator;
8 /** @const */ var InlineEditableItemList = options.InlineEditableItemList; 8 /** @const */ var InlineEditableItemList = options.InlineEditableItemList;
9 /** @const */ var InlineEditableItem = options.InlineEditableItem; 9 /** @const */ var InlineEditableItem = options.InlineEditableItem;
10 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; 10 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel;
11 11
12 /** 12 /**
13 * Returns whether exceptions list for the type is editable. 13 * Returns whether exceptions list for the type is editable.
14 * 14 *
15 * @param {string} contentType The type of the list. 15 * @param {string} contentType The type of the list.
16 */ 16 */
17 function isEditableType(contentType) { 17 function isEditableType(contentType) {
18 // Exceptions of the following lists are not editable for now. 18 // Exceptions of the following lists are not editable for now.
19 return !(contentType == 'location' || 19 return !(contentType == 'location' ||
20 contentType == 'media-stream-mic' || 20 contentType == 'media-stream-mic' ||
21 contentType == 'media-stream-camera' || 21 contentType == 'media-stream-camera' ||
22 contentType == 'midi-sysex' || 22 contentType == 'midi-sysex' ||
23 contentType == 'sensors' ||
23 contentType == 'zoomlevels' || 24 contentType == 'zoomlevels' ||
24 isChosenObjectType(contentType)); 25 isChosenObjectType(contentType));
25 } 26 }
26 27
27 /** 28 /**
28 * Returns whether exceptions of this type represent chosen objects. 29 * Returns whether exceptions of this type represent chosen objects.
29 * 30 *
30 * @param {string} contentType The type of the list. 31 * @param {string} contentType The type of the list.
31 */ 32 */
32 function isChosenObjectType(contentType) { 33 function isChosenObjectType(contentType) {
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 } 726 }
726 }; 727 };
727 728
728 return { 729 return {
729 ExceptionsListItem: ExceptionsListItem, 730 ExceptionsListItem: ExceptionsListItem,
730 ExceptionsAddRowListItem: ExceptionsAddRowListItem, 731 ExceptionsAddRowListItem: ExceptionsAddRowListItem,
731 ExceptionsList: ExceptionsList, 732 ExceptionsList: ExceptionsList,
732 ContentSettingsExceptionsArea: ContentSettingsExceptionsArea, 733 ContentSettingsExceptionsArea: ContentSettingsExceptionsArea,
733 }; 734 };
734 }); 735 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698