Commit 245c1bd1 authored by dizg's avatar dizg Committed by Commit Bot

[signin] Create view for the local profile customization

Bug: 1115056
Change-Id: I46e9750b9755e2ee62b3e3974b0ff6663d00de41
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2346354
Commit-Queue: Diana Zagidullina <dizg@google.com>
Reviewed-by: default avatarDavid Roger <droger@chromium.org>
Reviewed-by: default avatarMonica Basta <msalama@chromium.org>
Cr-Commit-Position: refs/heads/master@{#797393}
parent b7034312
......@@ -39,8 +39,11 @@ function computeStep(route) {
// TODO(msalama): Add support in profile creation mode for policies like:
// - ForceSignIn --> load signin page directly.
// - DisallowSignIn --> open local profile customization.
// - Check |signInProfileCreationFlow| is not enabled.
return ProfileCreationSteps.PROFILE_TYPE_CHOICE;
if (loadTimeData.getBoolean('signInProfileCreationFlow')) {
return ProfileCreationSteps.PROFILE_TYPE_CHOICE;
} else {
return ProfileCreationSteps.LOCAL_PROFILE_CUSTOMIZATION;
}
default:
assertNotReached();
}
......
......@@ -7,7 +7,10 @@ import("//tools/polymer/html_to_js.gni")
js_type_check("closure_compile") {
is_polymer3 = true
deps = [ ":profile_type_choice" ]
deps = [
":local_profile_customization",
":profile_type_choice",
]
}
js_library("profile_type_choice") {
......@@ -20,6 +23,15 @@ js_library("profile_type_choice") {
]
}
js_library("local_profile_customization") {
deps = [
"//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
]
}
html_to_js("web_components") {
js_files = [ "profile_type_choice.js" ]
js_files = [
"profile_type_choice.js",
"local_profile_customization.js",
]
}
......@@ -15,6 +15,7 @@ export function ensureLazyLoaded() {
lazyLoadPromise = Promise.all([
'profile-type-choice',
'local-profile-customization',
].map(name => customElements.whenDefined(name)));
}
return lazyLoadPromise;
......
......@@ -3,3 +3,4 @@
// found in the LICENSE file.
import './profile_type_choice.js';
import './local_profile_customization.js';
\ No newline at end of file
// Copyright 2020 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.
import {html, Polymer} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
Polymer({
is: 'local-profile-customization',
_template: html`{__html_template__}`,
});
\ No newline at end of file
......@@ -16,4 +16,10 @@
</profile-type-choice>
</template>
</cr-lazy-render>
<cr-lazy-render id="localProfileCustomization">
<template>
<local-profile-customization slot="view"></local-profile-customizatione>
</template>
</cr-lazy-render>
</cr-view-manager>
......@@ -46,6 +46,9 @@
<include name="IDR_PROFILE_PICKER_PROFILE_CREATION_FLOW_PROFILE_TYPE_CHOICE_JS"
file="${root_gen_dir}/chrome/browser/resources/signin/profile_picker/profile_creation_flow/profile_type_choice.js"
use_base_dir="false" type="BINDATA"/>
<include name="IDR_PROFILE_PICKER_PROFILE_CREATION_FLOW_LOCAL_PROFILE_CUSTOMIZATION_JS"
file="${root_gen_dir}/chrome/browser/resources/signin/profile_picker/profile_creation_flow/local_profile_customization.js"
use_base_dir="false" type="BINDATA"/>
<include name="IDR_PROFILE_PICKER_PROFILE_PICKER_SHARED_CSS_JS"
file="${root_gen_dir}/chrome/browser/resources/signin/profile_picker/profile_picker_shared_css.js"
use_base_dir="false" type="BINDATA"/>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment