-
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.
customization: Add routes for graphics tablet subpage
- Add a blank subpage for the graphics tablet. - Add the route for the subpage. Screenshot: https://screenshot.googleplex.com/AyVz2ruMZf4gfoQ Bug: b/241965717 Test: browser_tests --gtest_filter=*OSSettingsDevicePageTest* Change-Id: I8dcbd7a66ba1c83f4d13740159099e1ddfc5a2ba Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4611687 Commit-Queue: Yuhan Yang <yyhyyh@google.com> Reviewed-by: Wes Okuhara <wesokuhara@google.com> Cr-Commit-Position: refs/heads/main@{#1158493}
- Loading branch information
Showing
15 changed files
with
123 additions
and
7 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
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/graphics_tablet_subpage.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="graphicsTabletSubpageTitle">$i18n{tabletTitle}</div> |
54 changes: 54 additions & 0 deletions
54
chrome/browser/resources/settings/chromeos/device_page/graphics_tablet_subpage.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,54 @@ | ||
// Copyright 2023 The Chromium Authors | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
/** | ||
* @fileoverview | ||
* 'settings-graphics-tablet-subpage' allow users to configure their graphics | ||
* tablet settings for each device 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 {RouteObserverMixin, RouteObserverMixinInterface} from '../route_observer_mixin.js'; | ||
import {Route, routes} from '../router.js'; | ||
|
||
import {getTemplate} from './graphics_tablet_subpage.html.js'; | ||
|
||
const SettingsGraphicsTabletSubpageElementBase = | ||
RouteObserverMixin(I18nMixin(PolymerElement)) as { | ||
new (): PolymerElement & I18nMixinInterface & RouteObserverMixinInterface, | ||
}; | ||
|
||
export class SettingsGraphicsTabletSubpageElement extends | ||
SettingsGraphicsTabletSubpageElementBase { | ||
static get is() { | ||
return 'settings-graphics-tablet-subpage' as const; | ||
} | ||
|
||
static get template(): HTMLTemplateElement { | ||
return getTemplate(); | ||
} | ||
|
||
override currentRouteChanged(route: Route): void { | ||
// Does not apply to this page. | ||
if (route !== routes.GRAPHICS_TABLET) { | ||
return; | ||
} | ||
} | ||
} | ||
|
||
declare global { | ||
interface HTMLElementTagNameMap { | ||
[SettingsGraphicsTabletSubpageElement.is]: | ||
SettingsGraphicsTabletSubpageElement; | ||
} | ||
} | ||
|
||
customElements.define( | ||
SettingsGraphicsTabletSubpageElement.is, | ||
SettingsGraphicsTabletSubpageElement); |
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