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

Unified Diff: chrome/browser/resources/options/clear_browser_data_history_notice_overlay.js

Issue 1813023002: Add a notice about other forms of history to the CBD dialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add_component
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/options/clear_browser_data_history_notice_overlay.js
diff --git a/chrome/browser/resources/options/clear_browser_data_history_notice_overlay.js b/chrome/browser/resources/options/clear_browser_data_history_notice_overlay.js
new file mode 100644
index 0000000000000000000000000000000000000000..eed97d166367dfb6ecf448e463c2289a10399880
--- /dev/null
+++ b/chrome/browser/resources/options/clear_browser_data_history_notice_overlay.js
@@ -0,0 +1,51 @@
+// 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.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/**
+ * @fileoverview A popup that may be shown on top of the Clear Browsing Data
+ * overlay after the deletion finished.
+ */
+
+cr.define('options', function() {
+ /** @const */ var Page = cr.ui.pageManager.Page;
+ /** @const */ var PageManager = cr.ui.pageManager.PageManager;
+
+ /**
+ * A notice to be shown atop of the Clear Browsing Data overlay after
+ * the deletion of browsing history, informing the user that other forms
+ * of browsing history are still available.
+ * @constructor
+ * @extends {cr.ui.pageManager.Page}
+ */
+ function ClearBrowserDataHistoryNotice() {
+ Page.call(this, 'clearBrowserDataHistoryNotice',
+ loadTimeData.getString('clearBrowserDataOverlayTabTitle'),
+ 'clear-browser-data-history-notice');
+ }
+
+ cr.addSingletonGetter(ClearBrowserDataHistoryNotice);
+
+ ClearBrowserDataHistoryNotice.prototype = {
+ __proto__: Page.prototype,
+
+ /** @override */
+ initializePage: function() {
+ $('clear-browser-data-history-notice-ok').onclick =
+ 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.
+ },
+
+ /**
+ * Handles closing the dialog after clicking on the OK button.
+ */
+ handleClose: function() {
+ // Close this popup, and the Clear Browsing Data overlay below it.
+ PageManager.closeOverlay();
+ ClearBrowserDataOverlay.dismiss();
+ },
+ };
+
+ return {
+ ClearBrowserDataHistoryNotice: ClearBrowserDataHistoryNotice
+ };
+});

Powered by Google App Engine
This is Rietveld 408576698