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

Side by Side Diff: chrome/browser/resources/md_history/app.crisper.js

Issue 2264933002: [MD History] Make sidebar menu respond to spacebar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_presubmit
Patch Set: rebase Created 4 years, 4 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 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 function PromiseResolver() { 4 function PromiseResolver() {
5 this.resolve_; 5 this.resolve_;
6 this.reject_; 6 this.reject_;
7 this.promise_ = new Promise(function(resolve, reject) { 7 this.promise_ = new Promise(function(resolve, reject) {
8 this.resolve_ = resolve; 8 this.resolve_ = resolve;
9 this.reject_ = reject; 9 this.reject_ = reject;
10 }.bind(this)); 10 }.bind(this));
(...skipping 8536 matching lines...) Expand 10 before | Expand all | Expand 10 after
8547 type: String, 8547 type: String,
8548 notify: true 8548 notify: true
8549 }, 8549 },
8550 route: Object, 8550 route: Object,
8551 showFooter: Boolean, 8551 showFooter: Boolean,
8552 drawer: { 8552 drawer: {
8553 type: Boolean, 8553 type: Boolean,
8554 reflectToAttribute: true 8554 reflectToAttribute: true
8555 } 8555 }
8556 }, 8556 },
8557 listeners: {
8558 keydown: 'onKeydown_'
8559 },
8560 onKeydown_: function(e) {
8561 if (e.code == 'Space') e.path[0].click();
8562 },
8557 onSelectorActivate_: function() { 8563 onSelectorActivate_: function() {
8558 this.fire('history-close-drawer'); 8564 this.fire('history-close-drawer');
8559 }, 8565 },
8560 onClearBrowsingDataTap_: function(e) { 8566 onClearBrowsingDataTap_: function(e) {
8561 var browserService = md_history.BrowserService.getInstance(); 8567 var browserService = md_history.BrowserService.getInstance();
8562 browserService.recordAction('InitClearBrowsingData'); 8568 browserService.recordAction('InitClearBrowsingData');
8563 browserService.openClearBrowsingData(); 8569 browserService.openClearBrowsingData();
8564 e.preventDefault(); 8570 e.preventDefault();
8565 }, 8571 },
8566 getQueryString_: function(route) { 8572 getQueryString_: function(route) {
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
8758 8764
8759 case HistoryRange.MONTH: 8765 case HistoryRange.MONTH:
8760 histogramValue = HistoryPageViewHistogram.GROUPED_MONTH; 8766 histogramValue = HistoryPageViewHistogram.GROUPED_MONTH;
8761 break; 8767 break;
8762 } 8768 }
8763 break; 8769 break;
8764 } 8770 }
8765 md_history.BrowserService.getInstance().recordHistogram('History.HistoryPage View', histogramValue, HistoryPageViewHistogram.END); 8771 md_history.BrowserService.getInstance().recordHistogram('History.HistoryPage View', histogramValue, HistoryPageViewHistogram.END);
8766 } 8772 }
8767 }); 8773 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/md_history/side_bar.js » ('j') | chrome/browser/resources/md_history/side_bar.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698