-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Settings Split: Add empty settings-per-device-touchpad subpage and route
This CL creates and tests a blank <settings-per-device-touchpad> html element, and routes it accordingly in device_page.html. Screenshot: http://screen/AuunpTcVRwQrLUy Bug: b/241965700 Test: browser_tests --gtest_filter=*OSSettingsDevicePage* Change-Id: Ifc4e0a9e8758af9d8369d02c7df57cc65c22388c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4067242 Reviewed-by: Michael Checo <michaelcheco@google.com> Reviewed-by: David Padlipsky <dpad@google.com> Commit-Queue: Danny Wang <wangdanny@google.com> Reviewed-by: Zentaro Kavanagh <zentaro@chromium.org> Reviewed-by: Ahmed Fakhry <afakhry@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/main@{#1085272}
- Loading branch information
1 parent
fa13092
commit fbb6818
Showing
15 changed files
with
134 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
chrome/browser/resources/settings/chromeos/device_page/per_device_touchpad.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<div id="perDeviceTouchpadSubpageTitle">$i18n{touchpadTitle}</div> |
62 changes: 62 additions & 0 deletions
62
chrome/browser/resources/settings/chromeos/device_page/per_device_touchpad.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// Copyright 2022 The Chromium Authors | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
/** | ||
* @fileoverview | ||
* 'touchpad-settings' allow users to configure their touchpad settings in | ||
* system settings. | ||
*/ | ||
|
||
import '../../icons.html.js'; | ||
import '../../settings_shared.css.js'; | ||
|
||
import {I18nMixin, I18nMixinInterface} from 'chrome://resources/cr_elements/i18n_mixin.js'; | ||
import {PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; | ||
|
||
import {routes} from '../os_route.js'; | ||
import {RouteObserverMixin, RouteObserverMixinInterface} from '../route_observer_mixin.js'; | ||
import {Route} from '../router.js'; | ||
|
||
import {getTemplate} from './per_device_touchpad.html.js'; | ||
|
||
const SettingsPerDeviceTouchpadElementBase = | ||
RouteObserverMixin(I18nMixin(PolymerElement)) as { | ||
new (): PolymerElement & I18nMixinInterface & RouteObserverMixinInterface, | ||
}; | ||
|
||
class SettingsPerDeviceTouchpadElement extends | ||
SettingsPerDeviceTouchpadElementBase { | ||
static get is() { | ||
return 'settings-per-device-touchpad'; | ||
} | ||
|
||
static get template() { | ||
return getTemplate(); | ||
} | ||
|
||
static get properties() { | ||
return { | ||
isDeviceSettingsSplitEnabled: { | ||
type: Boolean, | ||
value: false, | ||
}, | ||
}; | ||
} | ||
|
||
override currentRouteChanged(route: Route): void { | ||
// Does not apply to this page. | ||
if (route !== routes.PER_DEVICE_TOUCHPAD) { | ||
return; | ||
} | ||
} | ||
} | ||
|
||
declare global { | ||
interface HTMLElementTagNameMap { | ||
'settings-per-device-touchpad': SettingsPerDeviceTouchpadElement; | ||
} | ||
} | ||
|
||
customElements.define( | ||
SettingsPerDeviceTouchpadElement.is, SettingsPerDeviceTouchpadElement); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters