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

Side by Side Diff: chrome/browser/resources/settings/advanced_page/advanced_page.html

Issue 1477773003: Use dom-if to hide settings pages and show explicitly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback Created 5 years 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 <link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html"> 1 <link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html">
2 <link rel="import" href="chrome://md-settings/downloads_page/downloads_page.html "> 2 <link rel="import" href="chrome://md-settings/downloads_page/downloads_page.html ">
3 <link rel="import" href="chrome://md-settings/languages_page/languages_page.html "> 3 <link rel="import" href="chrome://md-settings/languages_page/languages_page.html ">
4 <link rel="import" href="chrome://md-settings/passwords_and_forms_page/passwords _and_forms_page.html"> 4 <link rel="import" href="chrome://md-settings/passwords_and_forms_page/passwords _and_forms_page.html">
5 <link rel="import" href="chrome://md-settings/privacy_page/privacy_page.html"> 5 <link rel="import" href="chrome://md-settings/privacy_page/privacy_page.html">
6 <link rel="import" href="chrome://md-settings/reset_page/reset_page.html"> 6 <link rel="import" href="chrome://md-settings/reset_page/reset_page.html">
7 <link rel="import" href="chrome://md-settings/settings_page/settings_page_visibi lity.html">
7 <link rel="import" href="chrome://md-settings/settings_page/settings_section.htm l"> 8 <link rel="import" href="chrome://md-settings/settings_page/settings_section.htm l">
8 <link rel="import" href="chrome://md-settings/site_settings/constants.html"> 9 <link rel="import" href="chrome://md-settings/site_settings/constants.html">
9 <link rel="import" href="chrome://md-settings/site_settings/site_settings_catego ry.html"> 10 <link rel="import" href="chrome://md-settings/site_settings/site_settings_catego ry.html">
10 11
11 <if expr="chromeos"> 12 <if expr="chromeos">
12 <link rel="import" href="chrome://md-settings/a11y_page/a11y_page.html"> 13 <link rel="import" href="chrome://md-settings/a11y_page/a11y_page.html">
13 <link rel="import" href="chrome://md-settings/bluetooth_page/bluetooth_page.html "> 14 <link rel="import" href="chrome://md-settings/bluetooth_page/bluetooth_page.html ">
14 <link rel="import" href="chrome://md-settings/date_time_page/date_time_page.html "> 15 <link rel="import" href="chrome://md-settings/date_time_page/date_time_page.html ">
15 </if> 16 </if>
16 17
17 <dom-module id="settings-advanced-page"> 18 <dom-module id="settings-advanced-page">
18 <link rel="import" type="css" href="advanced_page.css"> 19 <link rel="import" type="css" href="advanced_page.css">
19 <template> 20 <template>
20 <if expr="chromeos"> 21 <if expr="chromeos">
21 <settings-section i18n-values="page-title:dateTimePageTitle" 22 <settings-section i18n-values="page-title:dateTimePageTitle"
22 current-route="[[currentRoute]]" section="dateTime"> 23 current-route="[[currentRoute]]" section="dateTime"
23 <settings-date-time-page prefs="{{prefs}}"> 24 hidden$="[[!pageVisible.dateTime]]">
24 </settings-date-time-page> 25 <template is="dom-if" if="[[pageVisible.dateTime]]">
michaelpg 2015/12/02 19:22:51 why can't we include the <settings-section> itself
stevenjb 2015/12/02 21:57:10 We can, but then we have to explicitly add each se
26 <settings-date-time-page prefs="{{prefs}}">
27 </settings-date-time-page>
28 </template>
25 </settings-section> 29 </settings-section>
26 </if> 30 </if>
27 <settings-section i18n-values="page-title:siteSettingsLocation" 31 <settings-section i18n-values="page-title:siteSettingsLocation"
28 current-route="[[currentRoute]]" section="location"> 32 current-route="[[currentRoute]]" section="location"
29 <site-settings-category id="locationCategory" prefs="{{prefs}}" 33 hidden$="[[!pageVisible.location]]">
30 current-route="{{currentRoute}}"> 34 <template is="dom-if" if="[[pageVisible.location]]">
31 </site-settings-category> 35 <site-settings-category prefs="{{prefs}}"
36 current-route="{{currentRoute}}">
37 </site-settings-category>
38 </template>
32 </settings-section> 39 </settings-section>
33
34 <settings-section i18n-values="page-title:privacyPageTitle" 40 <settings-section i18n-values="page-title:privacyPageTitle"
35 current-route="[[currentRoute]]" section="privacy"> 41 current-route="[[currentRoute]]" section="privacy"
36 <settings-privacy-page prefs="{{prefs}}" 42 hidden$="[[!pageVisible.privacy]]">
37 current-route="{{currentRoute}}"> 43 <template is="dom-if" if="[[pageVisible.privacy]]">
38 </settings-privacy-page> 44 <settings-privacy-page prefs="{{prefs}}"
45 current-route="{{currentRoute}}">
46 </settings-privacy-page>
47 </template>
39 </settings-section> 48 </settings-section>
40
41 <if expr="chromeos"> 49 <if expr="chromeos">
42 <settings-section i18n-values="page-title:bluetoothPageTitle" 50 <settings-section i18n-values="page-title:bluetoothPageTitle"
43 current-route="[[currentRoute]]" section="bluetooth"> 51 current-route="[[currentRoute]]" section="bluetooth"
44 <settings-bluetooth-page current-route="{{currentRoute}}"> 52 hidden$="[[!pageVisible.bluetooth]]">
45 </settings-bluetooth-page> 53 <template is="dom-if" if="[[pageVisible.bluetooth]]">
54 <settings-bluetooth-page current-route="{{currentRoute}}">
55 </settings-bluetooth-page>
56 </template>
46 </settings-section> 57 </settings-section>
47 </if> 58 </if>
48 59
49 <settings-section 60 <settings-section i18n-values="page-title:passwordsAndAutofillPageTitle"
50 i18n-values="page-title:passwordsAndAutofillPageTitle" 61 current-route="[[currentRoute]]" section="passwordsAndForms"
51 current-route="[[currentRoute]]" section="passwordsAndForms"> 62 hidden$="[[!pageVisible.passwordsAndForms]]">
52 <settings-passwords-and-forms-page prefs="{{prefs}}" 63 <template is="dom-if" if="[[pageVisible.passwordsAndForms]]">
53 current-route="{{currentRoute}}"> 64 <settings-passwords-and-forms-page prefs="{{prefs}}"
54 </settings-passwords-and-forms-page> 65 current-route="{{currentRoute}}">
66 </settings-passwords-and-forms-page>
67 </template>
55 </settings-section> 68 </settings-section>
56
57 <settings-section i18n-values="page-title:languagesPageTitle" 69 <settings-section i18n-values="page-title:languagesPageTitle"
58 current-route="[[currentRoute]]" section="languages"> 70 current-route="[[currentRoute]]" section="languages"
59 <settings-languages-page prefs="{{prefs}}" 71 hidden$="[[!pageVisible.languages]]">
60 current-route="{{currentRoute}}"> 72 <template is="dom-if" if="[[pageVisible.languages]]">
61 </settings-languages-page> 73 <settings-languages-page prefs="{{prefs}}"
74 current-route="{{currentRoute}}">
75 </settings-languages-page>
76 </template>
62 </settings-section> 77 </settings-section>
63
64 <settings-section i18n-values="page-title:downloadsPageTitle" 78 <settings-section i18n-values="page-title:downloadsPageTitle"
65 current-route="[[currentRoute]]" section="downloads"> 79 current-route="[[currentRoute]]" section="downloads"
66 <settings-downloads-page prefs="{{prefs}}"> 80 hidden$="[[!pageVisible.downloads]]">
67 </settings-downloads-page> 81 <template is="dom-if" if="[[pageVisible.downloads]]">
82 <settings-downloads-page prefs="{{prefs}}">
83 </settings-downloads-page>
84 </template>
68 </settings-section> 85 </settings-section>
69
70 <settings-section i18n-values="page-title:resetPageTitle" 86 <settings-section i18n-values="page-title:resetPageTitle"
71 current-route="[[currentRoute]]" section="reset"> 87 current-route="[[currentRoute]]" section="reset"
72 <settings-reset-page></settings-reset-page> 88 hidden$="[[!pageVisible.reset]]">
89 <template is="dom-if" if="[[pageVisible.reset]]">
90 <settings-reset-page></settings-reset-page>
91 </template>
73 </settings-section> 92 </settings-section>
74
75 <if expr="chromeos"> 93 <if expr="chromeos">
76 <!-- TODO(dbeam): find somewhere to stuff "Add more accessibility features" 94 <!-- TODO(dbeam): find somewhere to stuff "Add more accessibility features"
77 on desktop. --> 95 on desktop. -->
78 <settings-section i18n-values="page-title:a11yPageTitle" 96 <settings-section i18n-values="page-title:a11yPageTitle"
79 current-route="[[currentRoute]]" section="a11y"> 97 current-route="[[currentRoute]]" section="a11y"
80 <settings-a11y-page prefs="{{prefs}}"></settings-a11y-page> 98 hidden$="[[!pageVisible.a11y]]">
99 <template is="dom-if" if="[[pageVisible.a11y]]">
100 <settings-a11y-page prefs="{{prefs}}"></settings-a11y-page>
101 </template>
81 </settings-section> 102 </settings-section>
82 </if> 103 </if>
83 </template> 104 </template>
84 <script src="chrome://md-settings/advanced_page/advanced_page.js"></script> 105 <script src="chrome://md-settings/advanced_page/advanced_page.js"></script>
85 </dom-module> 106 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698