| Index: chrome/browser/resources/settings/controls/controlled_button.html
 | 
| diff --git a/chrome/browser/resources/settings/controls/controlled_button.html b/chrome/browser/resources/settings/controls/controlled_button.html
 | 
| new file mode 100644
 | 
| index 0000000000000000000000000000000000000000..5c028340f6a2a0deaa4e45a16cf9f107622548cd
 | 
| --- /dev/null
 | 
| +++ b/chrome/browser/resources/settings/controls/controlled_button.html
 | 
| @@ -0,0 +1,41 @@
 | 
| +<link rel="import" href="chrome://resources/html/polymer.html">
 | 
| +<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
 | 
| +<link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_behavior.html">
 | 
| +<link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_indicator.html">
 | 
| +<link rel="import" href="/controls/pref_control_behavior.html">
 | 
| +<link rel="import" href="/settings_shared_css.html">
 | 
| +
 | 
| +<dom-module id="controlled-button">
 | 
| +  <template>
 | 
| +    <style include="settings-shared">
 | 
| +      :host {
 | 
| +        align-items: center;
 | 
| +        display: flex;
 | 
| +      }
 | 
| +
 | 
| +      :host([controlled_]) {
 | 
| +        /* Disable pointer events for this whole element, as outer on-tap gets
 | 
| +         * triggered when clicking/tapping anywhere in :host. */
 | 
| +        pointer-events: none;
 | 
| +      }
 | 
| +
 | 
| +      cr-policy-pref-indicator {
 | 
| +        -webkit-margin-start: var(--checkbox-spacing);
 | 
| +        /* Enable pointer events for the indicator so :hover works. Disable
 | 
| +         * clicks/taps via onIndicatorTap_ so outer on-tap doesn't trigger. */
 | 
| +        pointer-events: all;
 | 
| +      }
 | 
| +    </style>
 | 
| +
 | 
| +    <paper-button disabled="[[controlled_]]">
 | 
| +      <content></content>
 | 
| +    </paper-button>
 | 
| +
 | 
| +    <template is="dom-if" if="[[controlled_]]">
 | 
| +      <cr-policy-pref-indicator pref="[[pref]]" on-tap="onIndicatorTap_">
 | 
| +      </cr-policy-pref-indicator>
 | 
| +    </template>
 | 
| +
 | 
| +  </template>
 | 
| +  <script src="/controls/controlled_button.js"></script>
 | 
| +</dom-module>
 | 
| 
 |