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

Unified Diff: chrome/browser/resources/settings/search_engines_page/search_engine_entry.js

Issue 2331423008: MD Settings: Search Engines: Move dropdown menu to search_engines_list (Closed)
Patch Set: . Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/search_engines_page/search_engine_entry.js
diff --git a/chrome/browser/resources/settings/search_engines_page/search_engine_entry.js b/chrome/browser/resources/settings/search_engines_page/search_engine_entry.js
index 5a33a8757e30841460ad6fc62290b8e7da8d55bb..9424205d2f6ad8eaa39989e8475a104dc1fab803 100644
--- a/chrome/browser/resources/settings/search_engines_page/search_engine_entry.js
+++ b/chrome/browser/resources/settings/search_engines_page/search_engine_entry.js
@@ -12,64 +12,6 @@ Polymer({
properties: {
/** @type {!SearchEngine} */
engine: Object,
-
- /** @private {boolean} */
- showEditSearchEngineDialog_: Boolean,
-
- /** @type {boolean} */
- isDefault: {
- reflectToAttribute: true,
- type: Boolean,
- computed: 'computeIsDefault_(engine)'
- },
- },
-
- /** @private {settings.SearchEnginesBrowserProxy} */
- browserProxy_: null,
-
- /** @override */
- created: function() {
- this.browserProxy_ = settings.SearchEnginesBrowserProxyImpl.getInstance();
- },
-
- /**
- * @return {boolean}
- * @private
- */
- computeIsDefault_: function() {
- return this.engine.default;
- },
-
- /** @private */
- onDeleteTap_: function() {
- this.browserProxy_.removeSearchEngine(this.engine.modelIndex);
- },
-
- /** @private */
- onEditTap_: function() {
- this.closePopupMenu_();
-
- this.showEditSearchEngineDialog_ = true;
- this.async(function() {
- var dialog = this.$$('settings-search-engine-dialog');
- // Register listener to detect when the dialog is closed. Flip the boolean
- // once closed to force a restamp next time it is shown such that the
- // previous dialog's contents are cleared.
- dialog.addEventListener('close', function() {
- this.showEditSearchEngineDialog_ = false;
- }.bind(this));
- }.bind(this));
- },
-
- /** @private */
- onMakeDefaultTap_: function() {
- this.closePopupMenu_();
- this.browserProxy_.setDefaultSearchEngine(this.engine.modelIndex);
- },
-
- /** @private */
- closePopupMenu_: function() {
- this.$$('iron-dropdown').close();
},
/**
@@ -81,4 +23,9 @@ Polymer({
// Force default icon, if no |engine.iconURL| is available.
return cr.icon.getFavicon(url || '');
},
+
+ /** @private */
+ onOpenMenuTap_() {
+ this.fire('open-menu', this.engine);
+ },
});

Powered by Google App Engine
This is Rietveld 408576698