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

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

Issue 2716333002: Implement important sites dialog for desktop. (Closed)
Patch Set: replace task observer in -Bridge and -Handler with a callback Created 3 years, 7 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..a16836dece76dcab5539ca2a95a274a73e962094
--- /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.
+ * An important site represents a domain with data that the user might want
+ * to protect from being deleted. ImportantSites are determined based on
+ * various engagement factors, such as whether a site is bookmarked or receives
+ * notifications.
+ */
+Polymer({
+ is: 'important-site-checkbox',
+
+ properties: {
+ /** @type {ImportantSite} */
+ site: Object,
+
+ disabled: {type: Boolean, value: false},
+ },
+
+ /**
+ * Returns the icon to use for a given site.
+ * @param {string} url 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);
Dan Beam 2017/05/05 17:52:51 where is this used?
dullweber 2017/05/09 08:56:39 It actually isn't used anymore. Thanks
+ },
+});

Powered by Google App Engine
This is Rietveld 408576698