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

Side by Side Diff: chrome/browser/resources/settings/search_engines_page/search_engines_page.js

Issue 2617663002: WIP: run clang-format-js on lots of things (Closed)
Patch Set: merge Created 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 'settings-search-engines-page' is the settings page 6 * @fileoverview 'settings-search-engines-page' is the settings page
7 * containing search engines settings. 7 * containing search engines settings.
8 */ 8 */
9 Polymer({ 9 Polymer({
10 is: 'settings-search-engines-page', 10 is: 'settings-search-engines-page',
11 11
12 behaviors: [WebUIListenerBehavior], 12 behaviors: [WebUIListenerBehavior],
13 13
14 properties: { 14 properties: {
15 /** @type {!Array<!SearchEngine>} */ 15 /** @type {!Array<!SearchEngine>} */
16 defaultEngines: { 16 defaultEngines: {
17 type: Array, 17 type: Array,
18 value: function() { return []; } 18 value: function() {
19 return [];
20 }
19 }, 21 },
20 22
21 /** @type {!Array<!SearchEngine>} */ 23 /** @type {!Array<!SearchEngine>} */
22 otherEngines: { 24 otherEngines: {
23 type: Array, 25 type: Array,
24 value: function() { return []; } 26 value: function() {
27 return [];
28 }
25 }, 29 },
26 30
27 /** @type {!Array<!SearchEngine>} */ 31 /** @type {!Array<!SearchEngine>} */
28 extensions: { 32 extensions: {
29 type: Array, 33 type: Array,
30 value: function() { return []; } 34 value: function() {
35 return [];
36 }
31 }, 37 },
32 38
33 /** @private {boolean} */ 39 /** @private {boolean} */
34 showAddSearchEngineDialog_: Boolean, 40 showAddSearchEngineDialog_: Boolean,
35 41
36 /** @private {boolean} */ 42 /** @private {boolean} */
37 showExtensionsList_: { 43 showExtensionsList_: {
38 type: Boolean, 44 type: Boolean,
39 computed: 'computeShowExtensionsList_(extensions)', 45 computed: 'computeShowExtensionsList_(extensions)',
40 } 46 }
41 }, 47 },
42 48
43 // Since the iron-list for extensions is enclosed in a dom-if, observe both 49 // Since the iron-list for extensions is enclosed in a dom-if, observe both
44 // |extensions| and |showExtensionsList_|. 50 // |extensions| and |showExtensionsList_|.
45 observers: ['extensionsChanged_(extensions, showExtensionsList_)'], 51 observers: ['extensionsChanged_(extensions, showExtensionsList_)'],
46 52
47 /** @override */ 53 /** @override */
48 ready: function() { 54 ready: function() {
49 settings.SearchEnginesBrowserProxyImpl.getInstance(). 55 settings.SearchEnginesBrowserProxyImpl.getInstance()
50 getSearchEnginesList().then(this.enginesChanged_.bind(this)); 56 .getSearchEnginesList()
57 .then(this.enginesChanged_.bind(this));
51 this.addWebUIListener( 58 this.addWebUIListener(
52 'search-engines-changed', this.enginesChanged_.bind(this)); 59 'search-engines-changed', this.enginesChanged_.bind(this));
53 }, 60 },
54 61
55 /** @private */ 62 /** @private */
56 extensionsChanged_: function() { 63 extensionsChanged_: function() {
57 if (this.showExtensionsList_ && this.$.extensions) 64 if (this.showExtensionsList_ && this.$.extensions)
58 this.$.extensions.notifyResize(); 65 this.$.extensions.notifyResize();
59 }, 66 },
60 67
(...skipping 23 matching lines...) Expand all
84 this.showAddSearchEngineDialog_ = false; 91 this.showAddSearchEngineDialog_ = false;
85 }.bind(this)); 92 }.bind(this));
86 }.bind(this)); 93 }.bind(this));
87 }, 94 },
88 95
89 /** @private */ 96 /** @private */
90 computeShowExtensionsList_: function() { 97 computeShowExtensionsList_: function() {
91 return this.extensions.length > 0; 98 return this.extensions.length > 0;
92 }, 99 },
93 }); 100 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698