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

Unified Diff: chrome/browser/resources/settings/controls/important_site_checkbox.js

Issue 2716333002: Implement important sites dialog for desktop. (Closed)
Patch Set: remove favicon Created 3 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/settings/controls/important_site_checkbox.js
diff --git a/chrome/browser/resources/settings/controls/important_site_checkbox.js b/chrome/browser/resources/settings/controls/important_site_checkbox.js
new file mode 100644
index 0000000000000000000000000000000000000000..cdcabad25e52e22844cb6b2fc8c6901731327d46
--- /dev/null
+++ b/chrome/browser/resources/settings/controls/important_site_checkbox.js
@@ -0,0 +1,32 @@
+// Copyright 2017 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
+ * `important-site-checkbox` is a checkbox that displays an important site.
+ */
+Polymer({
+ is: 'important-site-checkbox',
+
+ properties: {
+ /** The ImportantSite associated with this checkbox. */
dschuyler 2017/04/27 23:10:25 nit: consider removing comment. (if the comment is
dullweber 2017/04/28 12:34:03 Done.
+ site: {
+ type: ImportantSite,
+ },
dschuyler 2017/04/27 23:10:25 site: ImportantSite,
dullweber 2017/04/28 12:34:03 Do you mean that I should remove the object with t
dschuyler 2017/04/28 19:31:13 My intention was that the three lines of code sit
dullweber 2017/05/02 10:38:45 That doesn't seem to work. I guess the problem is
dschuyler 2017/05/02 18:19:23 You're right. Sorry, I totally wrote the wrong thi
+
+ /** Whether this checkbox should be disabled. */
dschuyler 2017/04/27 23:10:25 nit: consider removing comment - the code seems cl
dullweber 2017/04/28 12:34:03 I removed all comments. I thought public propertie
+ disabled: {type: Boolean, value: false},
+ },
+
+ /**
+ * Returns the icon to use for a given site.
+ * @param {string} site The url of the site to fetch the icon for.
+ * @return {string} The background-image style with the favicon.
+ * @private
+ */
+ siteIcon_: function(url) {
+ return 'background-image: ' + cr.icon.getFavicon(url);
+ },
+
+});

Powered by Google App Engine
This is Rietveld 408576698