Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <link rel="import" href="chrome://resources/html/polymer.html"> | 1 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 2 <link rel="import" href="chrome://resources/cr_elements/icons.html"> | 2 <link rel="import" href="chrome://resources/cr_elements/icons.html"> |
| 3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button.html"> | 3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button.html"> |
| 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-item/paper-item.h tml"> | |
| 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-menu/paper-menu.h tml"> | |
| 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-menu-button/paper -menu-button.html"> | |
| 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-toggle-button/pap er-toggle-button.html"> | 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-toggle-button/pap er-toggle-button.html"> |
| 5 <link rel="import" href="chrome://resources/cr_elements/cr_action_menu/cr_action _menu.html"> | |
| 6 | |
| 8 <link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html"> | 7 <link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html"> |
| 9 <link rel="import" href="/i18n_setup.html"> | 8 <link rel="import" href="/i18n_setup.html"> |
| 10 <link rel="import" href="/settings_shared_css.html"> | 9 <link rel="import" href="/settings_shared_css.html"> |
| 11 <link rel="import" href="/site_settings/site_settings_behavior.html"> | 10 <link rel="import" href="/site_settings/site_settings_behavior.html"> |
| 12 <link rel="import" href="/site_settings/site_settings_prefs_browser_proxy.html"> | 11 <link rel="import" href="/site_settings/site_settings_prefs_browser_proxy.html"> |
| 13 | 12 |
| 14 <dom-module id="protocol-handlers"> | 13 <dom-module id="protocol-handlers"> |
| 15 <template> | 14 <template> |
| 16 <style include="settings-shared"> | 15 <style include="settings-shared"> |
| 17 :host { | 16 :host { |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 35 <template is="dom-repeat" items="[[protocols]]" as="protocol"> | 34 <template is="dom-repeat" items="[[protocols]]" as="protocol"> |
| 36 <div class="site-settings-header">[[protocol.protocol]]</div> | 35 <div class="site-settings-header">[[protocol.protocol]]</div> |
| 37 | 36 |
| 38 <div class="list-frame menu-content vertical-list"> | 37 <div class="list-frame menu-content vertical-list"> |
| 39 <template is="dom-repeat" items="[[protocol.handlers]]"> | 38 <template is="dom-repeat" items="[[protocol.handlers]]"> |
| 40 | 39 |
| 41 <div class="list-item"> | 40 <div class="list-item"> |
| 42 <div class="favicon-image" style$="[[computeSiteIcon(item.host)]]"> | 41 <div class="favicon-image" style$="[[computeSiteIcon(item.host)]]"> |
| 43 </div> | 42 </div> |
| 44 <div class="middle" > | 43 <div class="middle" > |
| 45 <div>[[item.host]]</div> | 44 <div class="protocol-host">[[item.host]]</div> |
| 46 <div class="secondary" | 45 <div class="secondary protocol-default" |
| 47 hidden$="[[!isDefault_(index, protocol.default_handler)]]"> | 46 hidden$="[[!isDefault_(index, protocol.default_handler)]]"> |
| 48 $i18n{handlerIsDefault} | 47 $i18n{handlerIsDefault} |
| 49 </div> | 48 </div> |
| 50 </div> | 49 </div> |
| 51 | 50 |
| 52 <paper-menu-button> | 51 <paper-icon-button icon="cr:more-vert" on-tap="showMenu_" |
| 53 <paper-icon-button icon="cr:more-vert" | 52 class="dropdown-trigger"> |
| 54 class="dropdown-trigger"> | 53 </paper-icon-button> |
| 55 </paper-icon-button> | |
| 56 <paper-menu id="actionMenu" class="dropdown-content" actionable | |
| 57 on-iron-activate="onActionMenuIronActivate_" | |
| 58 attr-for-selected="menu-value"> | |
| 59 <paper-item menu-value$="[[menuActions_.SET_DEFAULT]]" | |
| 60 hidden$="[[isDefault_(index, protocol.default_handler)]]" | |
| 61 actionable> | |
| 62 $i18n{handlerSetDefault} | |
| 63 </paper-item> | |
| 64 <paper-item menu-value$="[[menuActions_.REMOVE]]" actionable> | |
| 65 $i18n{handlerRemove} | |
| 66 </paper-item> | |
| 67 </paper-menu> | |
| 68 </paper-menu-button> | |
| 69 </div> | 54 </div> |
| 70 | 55 |
| 71 </template> | 56 </template> |
| 72 </div> | 57 </div> |
| 73 </template> | 58 </template> |
| 59 | |
| 60 <dialog is="cr-action-menu"> | |
| 61 <button class="dropdown-item" role="option" on-tap="onDefaultTap_" | |
| 62 hidden$="[[isDefault_(actionMenuModel_.index, | |
|
dpapad
2016/11/14 18:26:20
I believe that hiding a menu option does not also
Dan Beam
2016/11/14 20:37:13
stuff with a computed style of display: none; (whi
dpapad
2016/11/14 20:39:34
Looked it up after I added this comment. For the c
scottchen
2016/11/14 21:38:36
The keyboard navigation seems to be working as exp
| |
| 63 actionMenuModel_.protocol.default_handler)]]" | |
|
dpapad
2016/11/14 18:26:20
Can we simplify the isDefault_ data binding as fol
Dan Beam
2016/11/14 20:37:13
i think dpapad@ meant
hidden$="[[isDefault(action
scottchen
2016/11/14 21:38:36
Done. I created a new isModelDefault_ function bec
| |
| 64 id="defaultButton"> | |
| 65 $i18n{handlerSetDefault} | |
| 66 </button> | |
| 67 <button class="dropdown-item" role="option" on-tap="onRemoveTap_" | |
| 68 id="removeButton"> | |
| 69 $i18n{handlerRemove} | |
| 70 </button> | |
| 71 </dialog> | |
| 74 </template> | 72 </template> |
| 75 <script src="protocol_handlers.js"></script> | 73 <script src="protocol_handlers.js"></script> |
| 76 </dom-module> | 74 </dom-module> |
| OLD | NEW |