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

Side by Side Diff: chrome/browser/resources/md_history/history_toolbar.js

Issue 1952283002: [MD History] Move Clear Browsing Data button to sidebar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_cbd
Patch Set: address comments Created 4 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 // 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 * @constructor 6 * @constructor
7 * @implements {SearchFieldDelegate} 7 * @implements {SearchFieldDelegate}
8 * @param {!HistoryToolbarElement} toolbar This history-toolbar. 8 * @param {!HistoryToolbarElement} toolbar This history-toolbar.
9 */ 9 */
10 function ToolbarSearchFieldDelegate(toolbar) { 10 function ToolbarSearchFieldDelegate(toolbar) {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 attached: function() { 87 attached: function() {
88 this.searchFieldDelegate_ = new ToolbarSearchFieldDelegate(this); 88 this.searchFieldDelegate_ = new ToolbarSearchFieldDelegate(this);
89 /** @type {SearchField} */(this.$['search-input']) 89 /** @type {SearchField} */(this.$['search-input'])
90 .setDelegate(this.searchFieldDelegate_); 90 .setDelegate(this.searchFieldDelegate_);
91 }, 91 },
92 92
93 onClearSelectionTap_: function() { 93 onClearSelectionTap_: function() {
94 this.fire('unselect-all'); 94 this.fire('unselect-all');
95 }, 95 },
96 96
97 /**
98 * Relocates the user to the clear browsing data section of the settings page.
99 * @private
100 */
101 onClearBrowsingDataTap_: function() {
102 window.location.href = 'chrome://settings/clearBrowserData';
103 },
104
105 onDeleteTap_: function() { 97 onDeleteTap_: function() {
106 this.fire('delete-selected'); 98 this.fire('delete-selected');
107 }, 99 },
108 100
109 /** 101 /**
110 * If the user is a supervised user the delete button is not shown. 102 * If the user is a supervised user the delete button is not shown.
111 * @private 103 * @private
112 */ 104 */
113 deletingAllowed_: function() { 105 deletingAllowed_: function() {
114 return loadTimeData.getBoolean('allowDeletingHistory'); 106 return loadTimeData.getBoolean('allowDeletingHistory');
115 }, 107 },
116 108
117 numberOfItemsSelected_: function(count) { 109 numberOfItemsSelected_: function(count) {
118 return count > 0 ? loadTimeData.getStringF('itemsSelected', count) : ''; 110 return count > 0 ? loadTimeData.getStringF('itemsSelected', count) : '';
119 } 111 }
120 }); 112 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_history/history_toolbar.html ('k') | chrome/browser/resources/md_history/shared_style.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698