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

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

Issue 2846433002: Disable Clear Browsing Data button in History for guest profiles (Closed)
Patch Set: 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
« no previous file with comments | « chrome/browser/resources/md_history/side_bar.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 Polymer({ 5 Polymer({
6 is: 'history-side-bar', 6 is: 'history-side-bar',
7 7
8 behaviors: [Polymer.IronA11yKeysBehavior], 8 behaviors: [Polymer.IronA11yKeysBehavior],
9 9
10 properties: { 10 properties: {
11 selectedPage: { 11 selectedPage: {
12 type: String, 12 type: String,
13 notify: true, 13 notify: true,
14 }, 14 },
15 15
16 /** @private */
17 guestSession_: {
18 type: Boolean,
19 value: loadTimeData.getBoolean('isGuestSession'),
20 },
21
16 showFooter: Boolean, 22 showFooter: Boolean,
17 }, 23 },
18 24
19 keyBindings: { 25 keyBindings: {
20 'space:keydown': 'onSpacePressed_', 26 'space:keydown': 'onSpacePressed_',
21 }, 27 },
22 28
23 /** 29 /**
24 * @param {CustomEvent} e 30 * @param {CustomEvent} e
25 * @private 31 * @private
(...skipping 16 matching lines...) Expand all
42 */ 48 */
43 onClearBrowsingDataTap_: function(e) { 49 onClearBrowsingDataTap_: function(e) {
44 var browserService = md_history.BrowserService.getInstance(); 50 var browserService = md_history.BrowserService.getInstance();
45 browserService.recordAction('InitClearBrowsingData'); 51 browserService.recordAction('InitClearBrowsingData');
46 browserService.openClearBrowsingData(); 52 browserService.openClearBrowsingData();
47 /** @type {PaperRippleElement} */ (this.$['cbd-ripple']).upAction(); 53 /** @type {PaperRippleElement} */ (this.$['cbd-ripple']).upAction();
48 e.preventDefault(); 54 e.preventDefault();
49 }, 55 },
50 56
51 /** 57 /**
58 * @return {number}
59 * @private
60 */
61 computeClearBrowsingDataTabIndex_: function() {
62 return this.guestSession_ ? -1 : 0;
63 },
64
65 /**
52 * Prevent clicks on sidebar items from navigating. These are only links for 66 * Prevent clicks on sidebar items from navigating. These are only links for
53 * accessibility purposes, taps are handled separately by <iron-selector>. 67 * accessibility purposes, taps are handled separately by <iron-selector>.
54 * @private 68 * @private
55 */ 69 */
56 onItemClick_: function(e) { 70 onItemClick_: function(e) {
57 e.preventDefault(); 71 e.preventDefault();
58 }, 72 },
59 }); 73 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_history/side_bar.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698