| Index: chrome/browser/resources/settings/on_startup_page/startup_url_dialog.js
|
| diff --git a/chrome/browser/resources/settings/on_startup_page/startup_url_dialog.js b/chrome/browser/resources/settings/on_startup_page/startup_url_dialog.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0d0f3182c57d4c0de915b0970ba4220cd3ce92aa
|
| --- /dev/null
|
| +++ b/chrome/browser/resources/settings/on_startup_page/startup_url_dialog.js
|
| @@ -0,0 +1,48 @@
|
| +// 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.
|
| +
|
| +/**
|
| + * @fileoverview 'settings-startup-url-dialog' is a component for adding
|
| + * or editing a startup URL entry.
|
| + */
|
| +Polymer({
|
| + is: 'settings-startup-url-dialog',
|
| +
|
| + properties: {
|
| + /** @private {string} */
|
| + url_: String,
|
| + },
|
| +
|
| + /** @private {!settings.SearchEnginesBrowserProxy} */
|
| + browserProxy_: null,
|
| +
|
| + /** @override */
|
| + ready: function() {
|
| + this.browserProxy_ = settings.StartupUrlsPageBrowserProxyImpl.getInstance();
|
| + this.$.add.disabled = true;
|
| + },
|
| +
|
| + /** @override */
|
| + attached: function() {
|
| + this.$.dialog.open();
|
| + },
|
| +
|
| + /** @private */
|
| + onCancelTap_: function() {
|
| + this.$.dialog.close();
|
| + },
|
| +
|
| + /** @private */
|
| + onAddTap_: function() {
|
| + this.browserProxy_.addStartupPage(this.url_);
|
| + this.$.dialog.close();
|
| + },
|
| +
|
| + /** @private */
|
| + validate_: function() {
|
| + this.browserProxy_.validateStartupPage(this.url_).then(function(isValid) {
|
| + this.$.add.disabled = !isValid;
|
| + }.bind(this));
|
| + },
|
| +});
|
|
|