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

Side by Side Diff: chrome/browser/resources/chromeos/emulator/bluetooth_settings.html

Issue 1999593002: Update chrome://device-emulator with newer Polymer guidelines (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: narrow mode drawer + webui safety Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 <link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html"> 1 <link rel="import" href="chrome://resources/html/polymer.html">
2 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-f lex-layout.html"> 2 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-f lex-layout-classes.html">
3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icons/device-icons .html"> 3 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/neon-ani matable-behavior.html">
4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html"> 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html">
5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch eckbox.html">
5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-dialog/paper-dial og.html"> 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-dialog/paper-dial og.html">
6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button.html"> 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button.html">
7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input .html"> 8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input .html">
9 <link rel="import" href="chrome://resources/polymer/v1_0/paper-radio-button/pape r-radio-button.html">
10 <link rel="import" href="chrome://resources/polymer/v1_0/paper-radio-group/paper -radio-group.html">
11 <link rel="import" href="icons.html">
12 <link rel="import" href="shared_styles.html">
8 13
9 <dom-module id="bluetooth-settings"> 14 <dom-module id="bluetooth-settings">
10 <link rel="import" type="css" href="shared_styles.css">
11 <template> 15 <template>
12 <paper-dialog on-iron-overlay-opened="editDialogOpened" modal 16 <!-- TODO(michaelpg): Wrap the line below to fit within the 80-char limit.
13 id="editModal"> 17 See https://github.com/Polymer/polymer/pull/3668. -->
18 <style include="device-emulator-shared-styles iron-flex iron-flex-alignment iron-positioning">
19 </style>
20 <paper-dialog on-iron-overlay-opened="editDialogOpened" with-backdrop
21 id="editDialog">
14 <div class="element-label">[[currentEditableObject.alias]]</div> 22 <div class="element-label">[[currentEditableObject.alias]]</div>
15 <div> 23 <div>
16 <form> 24 <form>
17 <div class="form-field-section"> 25 <div class="form-field-section">
18 <paper-input value="{{currentEditableObject.alias}}" 26 <paper-input value="{{currentEditableObject.alias}}"
19 label="Alias"></paper-input> 27 label="Alias"></paper-input>
20 <paper-input on-input="validatePath" 28 <paper-input on-input="validatePath"
21 id="devicePathInput" 29 id="devicePathInput"
22 value="{{currentEditableObject.path}}" 30 value="{{currentEditableObject.path}}"
23 label="Path" on-input="validatePath"></paper-input> 31 label="Path" on-input="validatePath"></paper-input>
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 </div> 94 </div>
87 </form> 95 </form>
88 </div> 96 </div>
89 <div class="buttons"> 97 <div class="buttons">
90 <paper-button dialog-dismiss>Close</paper-button> 98 <paper-button dialog-dismiss>Close</paper-button>
91 </div> 99 </div>
92 </paper-dialog> 100 </paper-dialog>
93 101
94 <div class="layout vertical"> 102 <div class="layout vertical">
95 <div class="element-label"> 103 <div class="element-label">
96 <paper-icon-button icon="device:bluetooth"></paper-icon-button> 104 <paper-icon-button icon="device-emulator:bluetooth"></paper-icon-button>
97 <span>[[title]]</span> 105 Bluetooth
98 </div> 106 </div>
99 <table class="devices-table"> 107 <table class="devices-table">
100 <tbody> 108 <tbody>
101 <tr class="table-section-header"> 109 <tr class="table-section-header">
102 <td colspan="2">Presets</td> 110 <td colspan="2">Presets</td>
103 <td class="centered-cell-label">Discoverable</td> 111 <td class="centered-cell-label">Discoverable</td>
104 <td class="centered-cell-label">Paired</td> 112 <td class="centered-cell-label">Paired</td>
105 </tr> 113 </tr>
106 <template is="dom-repeat" items="[[predefinedDevices]]"> 114 <template is="dom-repeat" items="[[predefinedDevices]]">
107 <tr> 115 <tr>
108 <td class="alias-cell">[[item.alias]]</td> 116 <td class="alias-cell">[[item.alias]]</td>
109 <td class="icon-cell"> 117 <td class="icon-cell">
110 <paper-icon-button icon="content-copy" 118 <paper-icon-button icon="device-emulator:content-copy"
111 on-click="copyDevice" data-predefined="true"> 119 on-click="copyDevice" data-predefined="true">
112 </paper-icon-button> 120 </paper-icon-button>
113 <paper-icon-button disabled icon="settings"></paper-icon-button> 121 <paper-icon-button disabled icon="device-emulator:settings">
114 <paper-icon-button disabled icon="delete"></paper-icon-button> 122 </paper-icon-button>
123 <paper-icon-button disabled icon="device-emulator:delete">
124 </paper-icon-button>
115 </td> 125 </td>
116 <td class="control-cell"> 126 <td class="control-cell">
117 <paper-checkbox checked="{{item.discoverable}}" 127 <paper-checkbox checked="{{item.discoverable}}"
118 data-predefined="true" 128 data-predefined="true"
119 on-change="discoverDevice"></paper-checkbox> 129 on-change="discoverDevice"></paper-checkbox>
120 </td> 130 </td>
121 <td class="control-cell"> 131 <td class="control-cell">
122 <paper-checkbox on-change="pairDevice" data-predefined="true" 132 <paper-checkbox on-change="pairDevice" data-predefined="true"
123 checked="{{item.paired}}"></paper-checkbox> 133 checked="{{item.paired}}"></paper-checkbox>
124 </td> 134 </td>
125 </tr> 135 </tr>
126 </template> 136 </template>
127 </tbody> 137 </tbody>
128 <tbody> 138 <tbody>
129 <tr class="table-section-header"> 139 <tr class="table-section-header">
130 <td colspan="4">Custom</td> 140 <td colspan="4">Custom</td>
131 </tr> 141 </tr>
132 <template is="dom-repeat" items="[[devices]]"> 142 <template is="dom-repeat" items="[[devices]]">
133 <tr> 143 <tr>
134 <td class="alias-cell">[[item.alias]]</td> 144 <td class="alias-cell">[[item.alias]]</td>
135 <td class="icon-cell"> 145 <td class="icon-cell">
136 <paper-icon-button icon="content-copy" data-predefined="false" 146 <paper-icon-button icon="device-emulator:content-copy"
137 on-click="copyDevice"></paper-icon-button> 147 data-predefined="false" on-click="copyDevice">
138 <paper-icon-button icon="settings" on-click="showEditModal" 148 </paper-icon-button>
139 ></paper-icon-button> 149 <paper-icon-button icon="device-emulator:settings"
140 <paper-icon-button icon="delete" on-click="deleteDevice" 150 on-click="showEditDialog">
141 ></paper-icon-button> 151 </paper-icon-button>
152 <paper-icon-button icon="device-emulator:delete"
153 on-click="deleteDevice">
154 </paper-icon-button>
142 </td> 155 </td>
143 <td class="control-cell"> 156 <td class="control-cell">
144 <paper-checkbox checked="{{item.discoverable}}" 157 <paper-checkbox checked="{{item.discoverable}}"
145 data-predefined="false" 158 data-predefined="false"
146 on-change="discoverDevice"></paper-checkbox> 159 on-change="discoverDevice"></paper-checkbox>
147 </td> 160 </td>
148 <td class="control-cell"> 161 <td class="control-cell">
149 <paper-checkbox checked="{{item.paired}}" 162 <paper-checkbox checked="{{item.paired}}"
150 data-predefined="false" 163 data-predefined="false"
151 on-change="pairDevice"></paper-checkbox> 164 on-change="pairDevice"></paper-checkbox>
152 </td> 165 </td>
153 </tr> 166 </tr>
154 </template> 167 </template>
155 </tbody> 168 </tbody>
156 </table> 169 </table>
157 <div class="add-device-container"> 170 <div class="add-device-container">
158 <paper-button on-click="appendNewDevice"> 171 <paper-button on-click="appendNewDevice">
159 Add Device 172 Add Device
160 </paper-button> 173 </paper-button>
161 </div> 174 </div>
162 </div> 175 </div>
163 </template> 176 </template>
164 <script src="bluetooth_settings.js"></script> 177 <script src="bluetooth_settings.js"></script>
165 </dom-module> 178 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698