| <link rel="import" href="chrome://resources/html/polymer.html"> |
| <link rel="import" href="chrome://resources/cr_elements/icons.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-toggle-button/paper-toggle-button.html"> |
| <link rel="import" href="chrome://resources/cr_elements/cr_action_menu/cr_action_menu.html"> |
| <link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html"> |
| <link rel="import" href="../i18n_setup.html"> |
| <link rel="import" href="../settings_shared_css.html"> |
| <link rel="import" href="site_settings_behavior.html"> |
| <link rel="import" href="site_settings_prefs_browser_proxy.html"> |
| |
| <dom-module id="protocol-handlers"> |
| <template> |
| <style include="settings-shared"> |
| :host { |
| display: block; |
| } |
| |
| .site-settings-header { |
| -webkit-margin-start: 20px; |
| margin-bottom: 15px; |
| margin-top: 15px; |
| } |
| </style> |
| <div class="settings-box first two-line"> |
| <div class="start secondary"> |
| [[computeHandlersDescription_(categoryEnabled)]] |
| </div> |
| <paper-toggle-button id="toggle" checked="{{categoryEnabled}}" |
| on-change="onToggleChange_"></paper-toggle-button> |
| </div> |
| |
| <template is="dom-repeat" items="[[protocols]]" as="protocol"> |
| <div class="site-settings-header">[[protocol.protocol]]</div> |
| |
| <div class="list-frame menu-content vertical-list"> |
| <template is="dom-repeat" items="[[protocol.handlers]]"> |
| |
| <div class="list-item"> |
| <div class="favicon-image" style$="[[computeSiteIcon(item.host)]]"> |
| </div> |
| <div class="middle" > |
| <div class="protocol-host">[[item.host]]</div> |
| <div class="secondary protocol-default" |
| hidden$="[[!isDefault_(index, protocol.default_handler)]]"> |
| $i18n{handlerIsDefault} |
| </div> |
| </div> |
| |
| <paper-icon-button icon="cr:more-vert" on-tap="showMenu_" |
| class="dropdown-trigger"> |
| </paper-icon-button> |
| </div> |
| |
| </template> |
| </div> |
| </template> |
| |
| <dialog is="cr-action-menu"> |
| <button class="dropdown-item" role="option" on-tap="onDefaultTap_" |
| hidden$="[[isModelDefault_(actionMenuModel_)]]" |
| id="defaultButton"> |
| $i18n{handlerSetDefault} |
| </button> |
| <button class="dropdown-item" role="option" on-tap="onRemoveTap_" |
| id="removeButton"> |
| $i18n{handlerRemove} |
| </button> |
| </dialog> |
| </template> |
| <script src="protocol_handlers.js"></script> |
| </dom-module> |