Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Side by Side Diff: chrome/browser/resources/settings/search_engines_page/add_search_engine_dialog.js

Issue 1666623006: MD Settings: Manage search engines 3/3, hooking up UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@manage_search_engines_handler
Patch Set: Resolving conflicts with ToT Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /**
6 * @fileoverview 'settings-add-search-engine-dialog' is a component for adding a
7 * new search engine.
8 *
9 * @group Chrome Settings Elements
10 * @element settings-add-search-engine-dialog
11 */
12 Polymer({
13 is: 'settings-add-search-engine-dialog',
14
15 open: function() {
16 this.$.dialog.open();
17 },
18
19 /** @private */
20 onCancelTap_: function() {
21 this.$.dialog.close();
22 },
23
24 /** @private */
25 onAddTap_: function() {
26 if (this.$.searchEngine.isInvalid ||
27 this.$.keyword.isInvalid ||
28 this.$.queryUrl.isInvalid) {
29 // TODO(dpapad): Handle validation properly.
30 this.$.dialog.close();
31 return;
32 }
33
34 chrome.searchEnginesPrivate.addOtherSearchEngine(
35 this.$.searchEngine.value, this.$.keyword.value,
36 this.$.queryUrl.value);
37 this.$.dialog.close();
38 },
39 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698