-
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.
[ChromeSigninIntercept] Create chrome-signin subpage
New sub-URL: chrome://signin-dice-web-intercept/chrome-signin The page currently shows a simple Cancel button in order to close the bubble. The content implementation will follow. Bug: b:301431278 Change-Id: I0b9aa8a343e346c13f1094436b603ac517f55e6c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4946450 Commit-Queue: Ryan Sultanem <rsult@google.com> Reviewed-by: Gabriel Oliveira <gabolvr@google.com> Reviewed-by: David Roger <droger@chromium.org> Cr-Commit-Position: refs/heads/main@{#1211639}
- Loading branch information
Ryan Sultanem
authored and
Chromium LUCI CQ
committed
Oct 18, 2023
1 parent
ad69e25
commit b0e2275
Showing
10 changed files
with
122 additions
and
8 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
26 changes: 26 additions & 0 deletions
26
chrome/browser/resources/signin/dice_web_signin_intercept/chrome_signin/chrome_signin.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,26 @@ | ||
<!doctype html> | ||
<html dir="$i18n{textdirection}" lang="$i18n{language}"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<link rel="stylesheet" href="chrome://resources/css/md_colors.css"> | ||
<link rel="stylesheet" href="chrome://resources/css/text_defaults_md.css"> | ||
<link rel="import" href="signin_vars_css.html"> | ||
<style> | ||
body { | ||
height: 100vh; | ||
margin: 0; | ||
width: 100vw; | ||
} | ||
@media (prefers-color-scheme: dark) { | ||
body { | ||
--md-background-color: var(--signin-dark-customized-background-color); | ||
background-color: var(--md-background-color); | ||
} | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<chrome-signin-app></chrome-signin-app> | ||
<script type="module" src="chrome_signin/chrome_signin_app.js"></script> | ||
</body> | ||
</html> |
9 changes: 9 additions & 0 deletions
9
...e/browser/resources/signin/dice_web_signin_intercept/chrome_signin/chrome_signin_app.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,9 @@ | ||
<div id="interceptDialog"> | ||
|
||
<div>Chrome Signin Intercept!</div> | ||
<div>(To be implemented)</div> | ||
<cr-button id="cancelButton" on-click="onCancel_"> | ||
Cancel | ||
</cr-button> | ||
|
||
</div> |
47 changes: 47 additions & 0 deletions
47
chrome/browser/resources/signin/dice_web_signin_intercept/chrome_signin/chrome_signin_app.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,47 @@ | ||
// 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. | ||
|
||
import '../strings.m.js'; | ||
import 'chrome://resources/cr_elements/cr_button/cr_button.js'; | ||
|
||
import {PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; | ||
|
||
import {DiceWebSigninInterceptBrowserProxy, DiceWebSigninInterceptBrowserProxyImpl} from '../dice_web_signin_intercept_browser_proxy.js'; | ||
|
||
import {getTemplate} from './chrome_signin_app.html.js'; | ||
|
||
export class ChromeSigninAppElement extends PolymerElement { | ||
static get is() { | ||
return 'chrome-signin-app'; | ||
} | ||
|
||
static get template() { | ||
return getTemplate(); | ||
} | ||
|
||
private diceWebSigninInterceptBrowserProxy_: | ||
DiceWebSigninInterceptBrowserProxy = | ||
DiceWebSigninInterceptBrowserProxyImpl.getInstance(); | ||
|
||
override connectedCallback() { | ||
super.connectedCallback(); | ||
|
||
const height = | ||
this.shadowRoot!.querySelector<HTMLElement>( | ||
'#interceptDialog')!.offsetHeight; | ||
this.diceWebSigninInterceptBrowserProxy_.initializedWithHeight(height); | ||
} | ||
|
||
private onCancel_() { | ||
this.diceWebSigninInterceptBrowserProxy_.cancel(); | ||
} | ||
} | ||
|
||
declare global { | ||
interface HTMLElementTagNameMap { | ||
'chrome-signin-app': ChromeSigninAppElement; | ||
} | ||
} | ||
|
||
customElements.define(ChromeSigninAppElement.is, ChromeSigninAppElement); |
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