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

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

Issue 2716333002: Implement important sites dialog for desktop. (Closed)
Patch Set: replace task observer in -Bridge and -Handler with a callback Created 3 years, 7 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 <link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html "> 1 <link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html ">
2 <link rel="import" href="chrome://resources/html/polymer.html"> 2 <link rel="import" href="chrome://resources/html/polymer.html">
3 <link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html"> 3 <link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html">
4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html"> 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html">
5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-spinner/paper-spi nner.html"> 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-spinner/paper-spi nner.html">
6 <link rel="import" href="../i18n_setup.html"> 6 <link rel="import" href="../i18n_setup.html">
7 <link rel="import" href="clear_browsing_data_browser_proxy.html"> 7 <link rel="import" href="clear_browsing_data_browser_proxy.html">
8 <link rel="import" href="history_deletion_dialog.html"> 8 <link rel="import" href="history_deletion_dialog.html">
9 <link rel="import" href="../controls/important_site_checkbox.html">
9 <link rel="import" href="../controls/settings_checkbox.html"> 10 <link rel="import" href="../controls/settings_checkbox.html">
10 <link rel="import" href="../controls/settings_dropdown_menu.html"> 11 <link rel="import" href="../controls/settings_dropdown_menu.html">
11 <link rel="import" href="../icons.html"> 12 <link rel="import" href="../icons.html">
12 <link rel="import" href="../settings_shared_css.html"> 13 <link rel="import" href="../settings_shared_css.html">
13 14
14 <dom-module id="settings-clear-browsing-data-dialog"> 15 <dom-module id="settings-clear-browsing-data-dialog">
15 <template> 16 <template>
16 <style include="settings-shared"> 17 <style include="settings-shared">
17 #dialog:not(.fully-rendered) { 18 #clearBrowsingDataDialog:not(.fully-rendered) {
18 visibility: hidden; 19 visibility: hidden;
19 } 20 }
20 21
21 #dialog .footer { 22 #clearBrowsingDataDialog .footer {
22 color: var(--paper-grey-600); 23 color: var(--paper-grey-600);
23 } 24 }
24 25
25 .row { 26 .row {
26 align-items: center; 27 align-items: center;
27 display: flex; 28 display: flex;
28 min-height: 40px; 29 min-height: 40px;
29 } 30 }
30 31
31 paper-spinner { 32 paper-spinner {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 } 80 }
80 81
81 .clear-browsing-data-footer a { 82 .clear-browsing-data-footer a {
82 text-decoration: none; 83 text-decoration: none;
83 } 84 }
84 85
85 #clearFrom { 86 #clearFrom {
86 -webkit-margin-start: 0.5em; 87 -webkit-margin-start: 0.5em;
87 } 88 }
88 89
90 .title .secondary {
91 font-size: calc(13 / 15 * 100%);
92 padding-top: 8px;
93 }
94
89 /* Cap the height on smaller screens to avoid unfavorable clipping. 95 /* Cap the height on smaller screens to avoid unfavorable clipping.
90 * Replace the bottom margin with padding to avoid the gap between 96 * Replace the bottom margin with padding to avoid the gap between
91 * the scrollbar and the bottom separator. */ 97 * the scrollbar and the bottom separator. */
92 @media all and (max-height: 724px) { 98 @media all and (max-height: 724px) {
93 #dialog { 99 #clearBrowsingDataDialog {
94 /* crbug.com/652027: Show four and a *half* items in the list. */ 100 /* crbug.com/652027: Show four and a *half* items in the list. */
95 --cr-dialog-body-container: { 101 --cr-dialog-body-container: {
96 max-height: 280px; 102 max-height: 280px;
97 }; 103 };
98 } 104 }
99 } 105 }
100 </style> 106 </style>
101 107
102 <dialog is="cr-dialog" id="dialog" close-text="$i18n{close}" 108 <dialog is="cr-dialog" id="clearBrowsingDataDialog"
103 ignore-popstate> 109 on-close="onClearBrowsingDataDialogClose_"
110 close-text="$i18n{close}" ignore-popstate>
104 <div class="title">$i18n{clearBrowsingData}</div> 111 <div class="title">$i18n{clearBrowsingData}</div>
105 <div class="body"> 112 <div class="body">
106 <div class="row"> 113 <div class="row">
107 $i18n{clearFollowingItemsFrom} 114 $i18n{clearFollowingItemsFrom}
108 <settings-dropdown-menu id="clearFrom" 115 <settings-dropdown-menu id="clearFrom"
109 label="$i18n{clearFollowingItemsFrom}" 116 label="$i18n{clearFollowingItemsFrom}"
110 pref="{{prefs.browser.clear_data.time_period}}" 117 pref="{{prefs.browser.clear_data.time_period}}"
111 menu-options="[[clearFromOptions_]]"> 118 menu-options="[[clearFromOptions_]]">
112 </settings-dropdown-menu> 119 </settings-dropdown-menu>
113 </div> 120 </div>
114 <settings-checkbox id="browsingCheckbox" 121 <settings-checkbox id="browsingCheckbox"
115 pref="{{prefs.browser.clear_data.browsing_history}}" 122 pref="{{prefs.browser.clear_data.browsing_history}}"
116 label="$i18n{clearBrowsingHistory}" 123 label="$i18n{clearBrowsingHistory}"
117 sub-label="[[counters_.browsing_history]]" 124 sub-label="[[counters_.browsing_history]]"
118 disabled="[[clearingInProgress_]]"> 125 disabled="[[clearingInProgress_]]">
119 </settings-checkbox> 126 </settings-checkbox>
120 <settings-checkbox id="downloadCheckbox" 127 <settings-checkbox id="downloadCheckbox"
121 pref="{{prefs.browser.clear_data.download_history}}" 128 pref="{{prefs.browser.clear_data.download_history}}"
122 label="$i18n{clearDownloadHistory}" 129 label="$i18n{clearDownloadHistory}"
123 sub-label="[[counters_.download_history]]" 130 sub-label="[[counters_.download_history]]"
124 disabled="[[clearingInProgress_]]"> 131 disabled="[[clearingInProgress_]]">
125 </settings-checkbox> 132 </settings-checkbox>
126 <settings-checkbox 133 <settings-checkbox id="cacheCheckbox"
127 pref="{{prefs.browser.clear_data.cache}}" 134 pref="{{prefs.browser.clear_data.cache}}"
128 label="$i18n{clearCache}" 135 label="$i18n{clearCache}"
129 sub-label="[[counters_.cache]]" 136 sub-label="[[counters_.cache]]"
130 disabled="[[clearingInProgress_]]"> 137 disabled="[[clearingInProgress_]]">
131 </settings-checkbox> 138 </settings-checkbox>
132 <settings-checkbox 139 <settings-checkbox id="cookiesCheckbox"
133 pref="{{prefs.browser.clear_data.cookies}}" 140 pref="{{prefs.browser.clear_data.cookies}}"
134 label="$i18n{clearCookies}" 141 label="$i18n{clearCookies}"
135 sub-label="$i18n{clearCookiesCounter}" 142 sub-label="$i18n{clearCookiesCounter}"
136 disabled="[[clearingInProgress_]]"> 143 disabled="[[clearingInProgress_]]">
137 </settings-checkbox> 144 </settings-checkbox>
138 <settings-checkbox 145 <settings-checkbox
139 pref="{{prefs.browser.clear_data.passwords}}" 146 pref="{{prefs.browser.clear_data.passwords}}"
140 label="$i18n{clearPasswords}" 147 label="$i18n{clearPasswords}"
141 sub-label="[[counters_.passwords]]" 148 sub-label="[[counters_.passwords]]"
142 disabled="[[clearingInProgress_]]"> 149 disabled="[[clearingInProgress_]]">
(...skipping 14 matching lines...) Expand all
157 pref="{{prefs.browser.clear_data.media_licenses}}" 164 pref="{{prefs.browser.clear_data.media_licenses}}"
158 label="$i18n{clearMediaLicenses}" 165 label="$i18n{clearMediaLicenses}"
159 sub-label="[[counters_.media_licenses]]" 166 sub-label="[[counters_.media_licenses]]"
160 disabled="[[clearingInProgress_]]"> 167 disabled="[[clearingInProgress_]]">
161 </settings-checkbox> 168 </settings-checkbox>
162 </div> 169 </div>
163 <div class="button-container"> 170 <div class="button-container">
164 <paper-spinner active="[[clearingInProgress_]]"></paper-spinner> 171 <paper-spinner active="[[clearingInProgress_]]"></paper-spinner>
165 <paper-button class="cancel-button" disabled="[[clearingInProgress_]]" 172 <paper-button class="cancel-button" disabled="[[clearingInProgress_]]"
166 on-tap="onCancelTap_">$i18n{cancel}</paper-button> 173 on-tap="onCancelTap_">$i18n{cancel}</paper-button>
167 <paper-button class="action-button" disabled="[[clearingInProgress_]]" 174 <paper-button id="clearBrowsingDataConfirm"
175 class="action-button" disabled="[[clearingInProgress_]]"
168 on-tap="onClearBrowsingDataTap_"> 176 on-tap="onClearBrowsingDataTap_">
169 $i18n{clearBrowsingData} 177 $i18n{clearBrowsingData}
170 </paper-button> 178 </paper-button>
171 </div> 179 </div>
172 <div class="footer"> 180 <div class="footer">
173 <div id="googleFooter" class="clear-browsing-data-footer"> 181 <div id="googleFooter" class="clear-browsing-data-footer">
174 <iron-icon icon="settings:googleg"></iron-icon> 182 <iron-icon icon="settings:googleg"></iron-icon>
175 <div class="footer-text">$i18nRaw{otherFormsOfBrowsingHistory}</div> 183 <div class="footer-text">$i18nRaw{otherFormsOfBrowsingHistory}</div>
176 </div> 184 </div>
177 <div id="generalFooter" class="clear-browsing-data-footer"> 185 <div id="generalFooter" class="clear-browsing-data-footer">
178 <iron-icon icon="settings:info"></iron-icon> 186 <iron-icon icon="settings:info"></iron-icon>
179 <div class="footer-text"> 187 <div class="footer-text">
180 <span id="syncedDataSentence">$i18n{clearsSyncedData}</span> 188 <span id="syncedDataSentence">$i18n{clearsSyncedData}</span>
181 <span>$i18n{warnAboutNonClearedData}</span> 189 <span>$i18n{warnAboutNonClearedData}</span>
182 <a id="clear-browser-data-old-learn-more-link" 190 <a id="clear-browser-data-old-learn-more-link"
183 href="$i18n{clearBrowsingDataLearnMoreUrl}" 191 href="$i18n{clearBrowsingDataLearnMoreUrl}"
184 target="_blank">$i18n{learnMore}</a> 192 target="_blank">$i18n{learnMore}</a>
185 </div> 193 </div>
186 </div> 194 </div>
187 </div> 195 </div>
188 </dialog> 196 </dialog>
189 197
198 <dialog is="cr-dialog" id="importantSitesDialog" close-text="$i18n{close}"
Dan Beam 2017/05/05 17:52:50 does this need to be in the same file? why isn't
dullweber 2017/05/09 08:56:39 It doesn't need to be in the same file but it redu
Dan Beam 2017/05/09 19:25:03 it potentially slows down showing the clear browsi
dullweber 2017/05/11 13:13:42 ok, I moved the dialog into a dom-if
199 show-scroll-borders ignore-popstate>
200 <div class="title">
201 $i18n{clearBrowsingData}
202 <div class="secondary">
203 $i18n{importantSitesSubtitle}
204 </div>
205 </div>
206 <div class="body">
207 <template is="dom-repeat" items="[[importantSites_]]">
208 <div class="row">
209 <important-site-checkbox
210 site="[[item]]"
211 disabled="[[clearingInProgress_]]">
212 </important-site-checkbox>
213 </div>
214 </template>
215 </div>
216 <div class="button-container">
217 <paper-spinner active="[[clearingInProgress_]]"></paper-spinner>
218 <paper-button class="cancel-button" disabled="[[clearingInProgress_]]"
219 on-tap="onImportantSitesCancelTap_">$i18n{cancel}</paper-button>
220 <paper-button id="importantSitesConfirm"
221 class="action-button" disabled="[[clearingInProgress_]]"
222 on-tap="onImportantSitesConfirmTap_">
223 $i18n{importantSitesConfirm}
224 </paper-button>
225 </div>
226 </dialog>
227
190 <template is="dom-if" if="[[showHistoryDeletionDialog_]]" restamp> 228 <template is="dom-if" if="[[showHistoryDeletionDialog_]]" restamp>
191 <settings-history-deletion-dialog id="notice" 229 <settings-history-deletion-dialog id="notice"
192 on-close="onHistoryDeletionDialogClose_"> 230 on-close="onHistoryDeletionDialogClose_">
193 </settings-history-deletion-dialog> 231 </settings-history-deletion-dialog>
194 </template> 232 </template>
195 </template> 233 </template>
196 <script src="clear_browsing_data_dialog.js"></script> 234 <script src="clear_browsing_data_dialog.js"></script>
197 </dom-module> 235 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698