Index: chrome/browser/resources/chromeos/login/saml_interstitial.js |
diff --git a/chrome/browser/resources/chromeos/login/saml_interstitial.js b/chrome/browser/resources/chromeos/login/saml_interstitial.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..bd7a53bbbee56ba70167c5336b8489f139778819 |
--- /dev/null |
+++ b/chrome/browser/resources/chromeos/login/saml_interstitial.js |
@@ -0,0 +1,31 @@ |
+// Copyright 2016 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. |
+ |
+Polymer({ |
+ is: 'saml-interstitial', |
xiyuan
2016/03/28 20:58:40
nit: insert an empty line between all fields
afakhry
2016/03/28 23:15:32
Done.
|
+ properties: { |
+ domain: { |
+ type: String, |
+ observer: 'onDomainChanged_' |
+ }, |
+ showDomainMessages_: { |
+ type: Boolean, |
+ value: false |
+ }, |
+ }, |
+ i18n_: function(args) { |
+ return loadTimeData.getStringF.apply(loadTimeData, args); |
+ }, |
+ onDomainChanged_: function() { |
+ this.$.message.content = |
+ this.i18n_(['samlInterstitialMessage', this.domain]); |
xiyuan
2016/03/28 20:58:40
Why not just use loadTimeData here?
i.e.
this.$
afakhry
2016/03/28 23:15:32
Thanks this is certainly better. I saw an example
xiyuan
2016/03/29 02:10:49
I suspect the sample does it that way because of i
|
+ this.showDomainMessages_ = !!this.domain.length; |
xiyuan
2016/03/28 20:58:40
|showDomainMessages_| seems redundant. If we do wa
afakhry
2016/03/28 23:15:32
I added a comment to the html.
|
+ }, |
+ onSamlPageNextClicked_: function() { |
+ this.dispatchEvent(new Event('samlPageNextClicked')); |
xiyuan
2016/03/28 20:58:40
nit: this.fire('samlPageNextClicked');
afakhry
2016/03/28 23:15:32
Done.
|
+ }, |
+ onSamlPageChangeAccountClicked_: function() { |
+ this.dispatchEvent(new Event('samlPageChangeAccountClicked')); |
xiyuan
2016/03/28 20:58:40
nit: this.fire('samlPageChangeAccountClicked');
afakhry
2016/03/28 23:15:32
Done.
|
+ }, |
+}); |