summaryrefslogtreecommitdiff
path: root/chromium/chrome/browser/resources/settings/crostini_page/crostini_page.js
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-08-24 12:15:48 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-08-28 13:30:04 +0000
commitb014812705fc80bff0a5c120dfcef88f349816dc (patch)
tree25a2e2d9fa285f1add86aa333389a839f81a39ae /chromium/chrome/browser/resources/settings/crostini_page/crostini_page.js
parent9f4560b1027ae06fdb497023cdcaf91b8511fa74 (diff)
downloadqtwebengine-chromium-b014812705fc80bff0a5c120dfcef88f349816dc.tar.gz
BASELINE: Update Chromium to 68.0.3440.125
Change-Id: I23f19369e01f688e496f5bf179abb521ad73874f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/chrome/browser/resources/settings/crostini_page/crostini_page.js')
-rw-r--r--chromium/chrome/browser/resources/settings/crostini_page/crostini_page.js54
1 files changed, 54 insertions, 0 deletions
diff --git a/chromium/chrome/browser/resources/settings/crostini_page/crostini_page.js b/chromium/chrome/browser/resources/settings/crostini_page/crostini_page.js
new file mode 100644
index 00000000000..1fe0967c346
--- /dev/null
+++ b/chromium/chrome/browser/resources/settings/crostini_page/crostini_page.js
@@ -0,0 +1,54 @@
+// 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
+ * 'crostini-page' is the settings page for enabling Crostini.
+ * Crostini Containers run Linux inside a Termina VM, allowing
+ * the user to run Linux apps on their Chromebook.
+ */
+
+Polymer({
+ is: 'settings-crostini-page',
+
+ behaviors: [PrefsBehavior],
+
+ properties: {
+ /** Preferences state. */
+ prefs: {
+ type: Object,
+ notify: true,
+ },
+
+ /** @private {!Map<string, string>} */
+ focusConfig_: {
+ type: Object,
+ value: function() {
+ const map = new Map();
+ if (settings.routes.CROSTINI_DETAILS) {
+ map.set(
+ settings.routes.CROSTINI_DETAILS.path,
+ '#crostini .subpage-arrow');
+ }
+ return map;
+ },
+ },
+ },
+
+ /**
+ * @param {!Event} event
+ * @private
+ */
+ onEnableTap_: function(event) {
+ settings.CrostiniBrowserProxyImpl.getInstance()
+ .requestCrostiniInstallerView();
+ event.stopPropagation();
+ },
+
+ /** @private */
+ onSubpageTap_: function(event) {
+ if (this.prefs.crostini.enabled.value)
+ settings.navigateTo(settings.routes.CROSTINI_DETAILS);
+ },
+});