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

Unified Diff: chrome/browser/resources/md_extensions/sidebar.js

Issue 1913353002: [MD Extensions] Add a details subpage, move to one list (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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_extensions/sidebar.js
diff --git a/chrome/browser/resources/md_extensions/sidebar.js b/chrome/browser/resources/md_extensions/sidebar.js
index 622c5ec3ada68aacad544a66042d0a361752bf01..8c3877f0b0a417d0c8562de5fc3d46b323f2ac89 100644
--- a/chrome/browser/resources/md_extensions/sidebar.js
+++ b/chrome/browser/resources/md_extensions/sidebar.js
@@ -24,17 +24,14 @@ cr.define('extensions', function() {
};
/** @interface */
- var SidebarScrollDelegate = function() {};
+ var SidebarListDelegate = function() {};
- SidebarScrollDelegate.prototype = {
- /** Scrolls to the extensions section. */
- scrollToExtensions: assertNotReached,
+ SidebarListDelegate.prototype = {
+ /** Shows extensions. */
+ showExtensions: assertNotReached,
- /** Scrolls to the apps section. */
- scrollToApps: assertNotReached,
-
- /** Scrolls to the websites section. */
- scrollToWebsites: assertNotReached,
+ /** Shows apps. */
+ showApps: assertNotReached,
};
var Sidebar = Polymer({
@@ -45,26 +42,9 @@ cr.define('extensions', function() {
type: Boolean,
value: false,
},
-
- hideExtensionsButton: {
- type: Boolean,
- value: false,
- },
-
- hideAppsButton: {
- type: Boolean,
- value: false,
- },
-
- hideWebsitesButton: {
- type: Boolean,
- value: false,
- },
},
- behaviors: [
- I18nBehavior,
- ],
+ behaviors: [I18nBehavior],
/** @param {extensions.SidebarDelegate} delegate */
setDelegate: function(delegate) {
@@ -72,25 +52,20 @@ cr.define('extensions', function() {
this.delegate_ = delegate;
},
- /** @param {extensions.SidebarScrollDelegate} scrollDelegate */
- setScrollDelegate: function(scrollDelegate) {
- /** @private {extensions.SidebarScrollDelegate} */
- this.scrollDelegate_ = scrollDelegate;
+ /** @param {extensions.SidebarListDelegate} listDelegate */
+ setListDelegate: function(listDelegate) {
+ /** @private {extensions.SidebarListDelegate} */
+ this.listDelegate_ = listDelegate;
},
/** @private */
onExtensionsTap_: function() {
- this.scrollDelegate_.scrollToExtensions();
+ this.listDelegate_.showExtensions();
},
/** @private */
onAppsTap_: function() {
- this.scrollDelegate_.scrollToApps();
- },
-
- /** @private */
- onWebsitesTap_: function() {
- this.scrollDelegate_.scrollToWebsites();
+ this.listDelegate_.showApps();
},
/** @private */
@@ -118,7 +93,7 @@ cr.define('extensions', function() {
return {
Sidebar: Sidebar,
SidebarDelegate: SidebarDelegate,
- SidebarScrollDelegate: SidebarScrollDelegate,
+ SidebarListDelegate: SidebarListDelegate,
};
});

Powered by Google App Engine
This is Rietveld 408576698