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

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: damn it 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
« no previous file with comments | « chrome/browser/prefs/browser_prefs.cc ('k') | chrome/browser/resources/md_downloads/vulcanized.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6cb4e37f57b505136c54c6747f533e8dab113823..f04da830e3459e9e6ce72450144ffab4a1b6ebb9 100644
--- a/chrome/browser/resources/md_downloads/crisper.js
+++ b/chrome/browser/resources/md_downloads/crisper.js
@@ -6768,11 +6768,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
@@ -6782,11 +6788,32 @@ 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'
+ });
+ this.fire('cr-menu-promo-shown');
+ }
+ }.bind(this));
+ },
+ titleIfNotShowMenuPromo_: function(title, showMenuPromo) {
+ return showMenuPromo ? '' : title;
}
});
« no previous file with comments | « chrome/browser/prefs/browser_prefs.cc ('k') | chrome/browser/resources/md_downloads/vulcanized.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698