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

Unified Diff: chrome/browser/resources/app_list/recommended_apps.js

Issue 874563003: Remove old HTML app list start page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/app_list/recommended_apps.js
diff --git a/chrome/browser/resources/app_list/recommended_apps.js b/chrome/browser/resources/app_list/recommended_apps.js
deleted file mode 100644
index d5fe706776dfd0682d8c0ba513d70e7700f40180..0000000000000000000000000000000000000000
--- a/chrome/browser/resources/app_list/recommended_apps.js
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-/**
- * @fileoverview Implement the recommended apps card in the launcher start page.
- */
-
-cr.define('appList.startPage', function() {
- 'use strict';
-
- /**
- * Create a view with icon and label for the given app data.
- * @constructor
- * @extends {HTMLDivElement}
- */
- var AppItemView = cr.ui.define('div');
-
- AppItemView.prototype = {
- __proto__: HTMLDivElement.prototype,
-
- /**
- * The app id of the app displayed by this view. Used to launch
- * the app when the view is clicked.
- * @type {string}
- */
- appId: '',
-
- /**
- * Sets the icon URL to display the app icon.
- * @type {string}
- */
- set iconUrl(url) {
- this.style.backgroundImage = 'url(' + url + ')';
- },
-
- /**
- * Sets the text title.
- * @type {string}
- */
- set textTitle(title) {
- this.textContent = title;
- },
-
- /** @override */
- decorate: function() {
- this.className = 'app';
- this.addEventListener('click', this.handleClick_.bind(this));
- },
-
- /**
- * Handles 'click' event.
- * @private
- */
- handleClick_: function() {
- assert(this.appId);
- chrome.send('launchApp', [this.appId]);
- }
- };
-
- /**
- * Create recommended apps card.
- * @constructor
- * @extends {HTMLDivElement}
- */
- var RecommendedApps = cr.ui.define('div');
-
- RecommendedApps.prototype = {
- __proto__: HTMLDivElement.prototype,
-
- /** @override */
- decorate: function() {
- this.className = 'recommended-apps';
- },
-
- /**
- * Sets the apps to be displayed in this card.
- */
- setApps: function(apps) {
- this.textContent = '';
- for (var i = 0; i < apps.length; ++i) {
- this.appendChild(new AppItemView(apps[i]));
- }
- }
- };
-
- return {
- RecommendedApps: RecommendedApps
- };
-});
« no previous file with comments | « chrome/browser/resources/app_list/recommended_apps.css ('k') | chrome/browser/resources/app_list/start_page.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698