Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | |
|
Dan Beam
2016/03/18 22:48:39
nit: no (c)
msramek
2016/03/21 16:30:25
Done.
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 /** | |
| 6 * @fileoverview A popup that may be shown on top of the Clear Browsing Data | |
| 7 * overlay after the deletion finished. | |
| 8 */ | |
| 9 | |
| 10 cr.define('options', function() { | |
| 11 /** @const */ var Page = cr.ui.pageManager.Page; | |
| 12 /** @const */ var PageManager = cr.ui.pageManager.PageManager; | |
| 13 | |
| 14 /** | |
| 15 * A notice to be shown atop of the Clear Browsing Data overlay after | |
| 16 * the deletion of browsing history, informing the user that other forms | |
| 17 * of browsing history are still available. | |
| 18 * @constructor | |
| 19 * @extends {cr.ui.pageManager.Page} | |
| 20 */ | |
| 21 function ClearBrowserDataHistoryNotice() { | |
| 22 Page.call(this, 'clearBrowserDataHistoryNotice', | |
| 23 loadTimeData.getString('clearBrowserDataOverlayTabTitle'), | |
| 24 'clear-browser-data-history-notice'); | |
| 25 } | |
| 26 | |
| 27 cr.addSingletonGetter(ClearBrowserDataHistoryNotice); | |
| 28 | |
| 29 ClearBrowserDataHistoryNotice.prototype = { | |
| 30 __proto__: Page.prototype, | |
| 31 | |
| 32 /** @override */ | |
| 33 initializePage: function() { | |
| 34 $('clear-browser-data-history-notice-ok').onclick = | |
| 35 this.handleClose.bind(this); | |
|
Dan Beam
2016/03/18 22:48:39
nit: why not
$('clear-browser-data-history-notice
msramek
2016/03/21 16:30:25
Sure :) Done.
| |
| 36 }, | |
| 37 | |
| 38 /** | |
| 39 * Handles closing the dialog after clicking on the OK button. | |
| 40 */ | |
| 41 handleClose: function() { | |
| 42 // Close this popup, and the Clear Browsing Data overlay below it. | |
| 43 PageManager.closeOverlay(); | |
| 44 ClearBrowserDataOverlay.dismiss(); | |
| 45 }, | |
| 46 }; | |
| 47 | |
| 48 return { | |
| 49 ClearBrowserDataHistoryNotice: ClearBrowserDataHistoryNotice | |
| 50 }; | |
| 51 }); | |
| OLD | NEW |