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

Unified Diff: chrome/browser/resources/md_downloads/crisper.js

Issue 2280513002: MD History: promote menu button to show clear browsing data in narrow mode (Closed)
Patch Set: go full vanilla Created 4 years, 3 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/md_downloads/crisper.js
diff --git a/chrome/browser/resources/md_downloads/crisper.js b/chrome/browser/resources/md_downloads/crisper.js
index a2ae0bac82c425a4091d0da10a9cffcc907a4d34..a31e5c22ce62fd570187fb4a3d740ad468b0a14b 100644
--- a/chrome/browser/resources/md_downloads/crisper.js
+++ b/chrome/browser/resources/md_downloads/crisper.js
@@ -6762,11 +6762,17 @@ Polymer({
searchPrompt: String,
clearLabel: String,
menuLabel: String,
+ menuPromo: String,
spinnerActive: Boolean,
showMenu: {
type: Boolean,
value: false
},
+ showMenuPromo: {
+ type: Boolean,
+ value: false
+ },
+ closeMenuPromo: String,
narrow_: {
type: Boolean,
reflectToAttribute: true
@@ -6776,11 +6782,31 @@ Polymer({
reflectToAttribute: true
}
},
+ observers: [ 'possiblyShowMenuPromo_(showMenu, showMenuPromo, showingSearch_)' ],
getSearchField: function() {
return this.$.search;
},
- onMenuTap_: function(e) {
+ onClosePromoTap_: function() {
+ this.showMenuPromo = false;
+ },
+ onMenuTap_: function() {
this.fire('cr-menu-tap');
+ this.onClosePromoTap_();
+ },
+ possiblyShowMenuPromo_: function() {
+ Polymer.RenderStatus.afterNextRender(this, function() {
+ if (this.showMenu && this.showMenuPromo && !this.showingSearch_) {
+ this.$$('#menuPromo').animate({
+ opacity: [ 0, .9 ]
+ }, {
+ duration: 500,
+ fill: 'forwards'
+ });
+ }
+ }.bind(this));
+ },
+ titleIfNotShowMenuPromo_: function(title, showMenuPromo) {
+ return showMenuPromo ? '' : title;
}
});

Powered by Google App Engine
This is Rietveld 408576698