Commit e21cf8f0 authored by scottchen's avatar scottchen Committed by Commit bot

MD Settings: omnibox extensions list to use focus-row-behavior.

Makes it behave the same as the other iron-lists on the page.

BUG=None
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2852413003
Cr-Commit-Position: refs/heads/master@{#469533}
parent b76b8338
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
'<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:cr', '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:cr',
'<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:icon', '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:icon',
'../compiled_resources2.gyp:extension_control_browser_proxy', '../compiled_resources2.gyp:extension_control_browser_proxy',
'../compiled_resources2.gyp:focus_row_behavior',
'search_engines_browser_proxy', 'search_engines_browser_proxy',
], ],
'includes': ['../../../../../third_party/closure_compiler/compile_js2.gypi'], 'includes': ['../../../../../third_party/closure_compiler/compile_js2.gypi'],
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<link rel="import" href="chrome://resources/html/icon.html"> <link rel="import" href="chrome://resources/html/icon.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button.html">
<link rel="import" href="../extension_control_browser_proxy.html"> <link rel="import" href="../extension_control_browser_proxy.html">
<link rel="import" href="../focus_row_behavior.html">
<link rel="import" href="search_engine_entry_css.html"> <link rel="import" href="search_engine_entry_css.html">
<link rel="import" href="../settings_shared_css.html"> <link rel="import" href="../settings_shared_css.html">
...@@ -25,15 +26,16 @@ ...@@ -25,15 +26,16 @@
-webkit-margin-end: 8px; -webkit-margin-end: 8px;
} }
</style> </style>
<div class="list-item"> <div class="list-item" focus-row-container>
<div class="name-column"> <div class="name-column">
<span class="favicon-image" <span class="favicon-image"
style="background-image: [[getIconSet_(engine.iconURL)]]"></span> style="background-image: [[getIconSet_(engine.iconURL)]]"></span>
<span class="name">[[engine.displayName]]</span> <span class="name">[[engine.displayName]]</span>
</div> </div>
<div class="keyword-column">[[engine.keyword]]</div> <div class="keyword-column">[[engine.keyword]]</div>
<paper-icon-button icon="cr:more-vert" tabindex$="[[tabindex]]" <paper-icon-button icon="cr:more-vert" focus-row-control
on-tap="onDotsTap_" title="$i18n{moreActions}"> on-tap="onDotsTap_" title="$i18n{moreActions}"
focus-type="cr-menu-button">
</paper-icon-button> </paper-icon-button>
<dialog is="cr-action-menu"> <dialog is="cr-action-menu">
<button class="dropdown-item" role="option" on-tap="onManageTap_" <button class="dropdown-item" role="option" on-tap="onManageTap_"
......
...@@ -14,6 +14,8 @@ Polymer({ ...@@ -14,6 +14,8 @@ Polymer({
engine: Object, engine: Object,
}, },
behaviors: [FocusRowBehavior],
/** @private {?settings.ExtensionControlBrowserProxy} */ /** @private {?settings.ExtensionControlBrowserProxy} */
browserProxy_: null, browserProxy_: null,
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<div id="url-column" class="text-elide">[[engine.url]]</div> <div id="url-column" class="text-elide">[[engine.url]]</div>
<paper-icon-button icon="cr:more-vert" on-tap="onDotsTap_" <paper-icon-button icon="cr:more-vert" on-tap="onDotsTap_"
title="$i18n{moreActions}" focus-row-control title="$i18n{moreActions}" focus-row-control
focus-type='cr-menu-button'> focus-type="cr-menu-button">
</paper-icon-button> </paper-icon-button>
<dialog is="cr-action-menu"> <dialog is="cr-action-menu">
<button class="dropdown-item" role="option" on-tap="onMakeDefaultTap_" <button class="dropdown-item" role="option" on-tap="onMakeDefaultTap_"
......
...@@ -51,10 +51,11 @@ ...@@ -51,10 +51,11 @@
<h2>$i18n{searchEnginesExtension}</h2> <h2>$i18n{searchEnginesExtension}</h2>
</div> </div>
<iron-list id="extensions" class="extension-engines fixed-height-list" <iron-list id="extensions" class="extension-engines fixed-height-list"
selectable items="[[extensions]]"> items="[[extensions]]">
<template> <template>
<settings-omnibox-extension-entry engine="[[item]]" <settings-omnibox-extension-entry engine="[[item]]"
tabindex$="[[tabIndex]]"> tabindex$="[[tabIndex]]" iron-list-tab-index="[[tabIndex]]"
last-focused="{{omniboxExtensionlastFocused_}}">
</settings-omnibox-extension-entry> </settings-omnibox-extension-entry>
</template> </template>
</iron-list> </iron-list>
......
...@@ -46,7 +46,10 @@ Polymer({ ...@@ -46,7 +46,10 @@ Polymer({
showExtensionsList_: { showExtensionsList_: {
type: Boolean, type: Boolean,
computed: 'computeShowExtensionsList_(extensions)', computed: 'computeShowExtensionsList_(extensions)',
} },
/** @private {HTMLElement} */
omniboxExtensionlastFocused_: Object,
}, },
// Since the iron-list for extensions is enclosed in a dom-if, observe both // Since the iron-list for extensions is enclosed in a dom-if, observe both
......
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