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

Unified Diff: chrome/browser/resources/md_history/app.js

Issue 2020963002: MD History: Add responsive layout which hides the sidebar in thin windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nits Created 4 years, 6 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_history/app.js
diff --git a/chrome/browser/resources/md_history/app.js b/chrome/browser/resources/md_history/app.js
index 377e109db265b75d7df6176128798a0dc8c25f3b..266e4dfc290750811c8651044c13f8e09ea070de 100644
--- a/chrome/browser/resources/md_history/app.js
+++ b/chrome/browser/resources/md_history/app.js
@@ -19,7 +19,11 @@ Polymer({
properties: {
// The id of the currently selected page.
- selectedPage_: String,
+ selectedPage_: {
+ type: String,
+ value: 'history-list',
+ observer: 'unselectAll'
+ },
// Whether domain-grouped history is enabled.
grouped_: {
@@ -63,6 +67,7 @@ Polymer({
// TODO(calamity): Replace these event listeners with data bound properties.
listeners: {
+ 'cr-menu-tap': 'onMenuTap_',
'history-checkbox-select': 'checkboxSelected',
'unselect-all': 'unselectAll',
'delete-selected': 'deleteSelected',
@@ -75,6 +80,11 @@ Polymer({
this.grouped_ = loadTimeData.getBoolean('groupByDomain');
},
+ /** @private */
+ onMenuTap_: function() {
+ this.$['side-bar'].toggle();
+ },
+
/**
* Listens for history-item being selected or deselected (through checkbox)
* and changes the view of the top toolbar.
@@ -88,6 +98,7 @@ Polymer({
/**
* Listens for call to cancel selection and loops through all items to set
* checkbox to be unselected.
+ * @private
*/
unselectAll: function() {
var historyList =
« no previous file with comments | « chrome/browser/resources/md_history/app.html ('k') | chrome/browser/resources/md_history/compiled_resources2.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698