summaryrefslogtreecommitdiff
path: root/chromium/chrome/browser/resources/settings/multidevice_page/multidevice_feature_item.js
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/chrome/browser/resources/settings/multidevice_page/multidevice_feature_item.js')
-rw-r--r--chromium/chrome/browser/resources/settings/multidevice_page/multidevice_feature_item.js67
1 files changed, 0 insertions, 67 deletions
diff --git a/chromium/chrome/browser/resources/settings/multidevice_page/multidevice_feature_item.js b/chromium/chrome/browser/resources/settings/multidevice_page/multidevice_feature_item.js
deleted file mode 100644
index 1b8b003a81c..00000000000
--- a/chromium/chrome/browser/resources/settings/multidevice_page/multidevice_feature_item.js
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2018 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
- * Item for an individual multidevice feature. These features appear in the
- * multidevice subpage to allow the user to individually toggle them as long as
- * the phone is enabled as a multidevice host. The feature items contain basic
- * information relevant to the individual feature, such as a route to the
- * feature's autonomous page if there is one.
- */
-cr.exportPath('settings');
-
-Polymer({
- is: 'settings-multidevice-feature-item',
-
- behaviors: [MultiDeviceFeatureBehavior],
-
- properties: {
- /** @type {!settings.MultiDeviceFeature} */
- feature: Number,
-
- /**
- * If it is truthy, the item should be actionable and clicking on it should
- * navigate to the provided route. Otherwise, the item is simply not
- * actionable.
- * @type {settings.Route|undefined}
- */
- subpageRoute: Object,
-
- /**
- * URLSearchParams for subpage route. No param is provided if it is
- * undefined.
- * @type {URLSearchParams|undefined}
- */
- subpageRouteUrlSearchParams: Object,
- },
-
- /**
- * @return {boolean}
- * @private
- */
- hasSubpageClickHandler_: function() {
- return !!this.subpageRoute && this.isFeatureAllowedByPolicy(this.feature);
- },
-
- /** @private */
- handleItemClick_: function(event) {
- if (!this.hasSubpageClickHandler_()) {
- return;
- }
-
- // We do not navigate away if the click was on a link.
- if (event.path[0].tagName === 'A') {
- event.stopPropagation();
- return;
- }
-
- // Remove the search term when navigating to avoid potentially having any
- // visible search term reappear at a later time. See
- // https://crbug.com/989119.
- settings.navigateTo(
- this.subpageRoute, this.subpageRouteUrlSearchParams,
- true /* opt_removeSearch */);
- },
-});