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

Side by Side Diff: chrome/browser/resources/settings/bluetooth_page/bluetooth_page.html

Issue 2801403002: MD Settings: Bluetooth: Fix adapter state and discovery (Closed)
Patch Set: Use CHECK instead of early exit Created 3 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/resources/settings/bluetooth_page/bluetooth_page.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_in dicator.html"> 1 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_in dicator.html">
2 <link rel="import" href="chrome://resources/html/polymer.html"> 2 <link rel="import" href="chrome://resources/html/polymer.html">
3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/classe s/iron-flex-layout.html"> 3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/classe s/iron-flex-layout.html">
4 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/neon-ani matable.html"> 4 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/neon-ani matable.html">
5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button-light.html"> 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button-light.html">
6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-toggle-button/pap er-toggle-button.html"> 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-toggle-button/pap er-toggle-button.html">
7 <link rel="import" href="../i18n_setup.html"> 7 <link rel="import" href="../i18n_setup.html">
8 <link rel="import" href="../icons.html"> 8 <link rel="import" href="../icons.html">
9 <link rel="import" href="../prefs/prefs.html"> 9 <link rel="import" href="../prefs/prefs.html">
10 <link rel="import" href="../settings_page/settings_animated_pages.html"> 10 <link rel="import" href="../settings_page/settings_animated_pages.html">
11 <link rel="import" href="../settings_page/settings_subpage.html"> 11 <link rel="import" href="../settings_page/settings_subpage.html">
12 <link rel="import" href="../settings_shared_css.html"> 12 <link rel="import" href="../settings_shared_css.html">
13 <link rel="import" href="bluetooth_subpage.html"> 13 <link rel="import" href="bluetooth_subpage.html">
14 14
15 <dom-module id="settings-bluetooth-page"> 15 <dom-module id="settings-bluetooth-page">
16 <template> 16 <template>
17 <style include="settings-shared"> 17 <style include="settings-shared">
18 </style> 18 </style>
19 <settings-animated-pages id="pages" section="bluetooth"> 19 <settings-animated-pages id="pages" section="bluetooth">
20 <neon-animatable route-path="default"> 20 <neon-animatable route-path="default">
21 <div id="bluetoothDevices" 21 <div id="bluetoothDevices"
22 class="settings-box two-line" actionable on-tap="onTap_"> 22 class="settings-box two-line" actionable on-tap="onTap_">
23 <iron-icon icon="[[getIcon_(bluetoothEnabled_)]]"></iron-icon> 23 <iron-icon icon="[[getIcon_(bluetoothToggleState_)]]"></iron-icon>
24 <div class="middle"> 24 <div class="middle">
25 $i18n{bluetoothPageTitle} 25 $i18n{bluetoothPageTitle}
26 <div class="secondary" id="bluetoothSecondary"> 26 <div class="secondary" id="bluetoothSecondary">
27 [[getOnOffString_(bluetoothEnabled_, 27 [[getOnOffString_(bluetoothToggleState_,
28 '$i18nPolymer{deviceOn}', '$i18nPolymer{deviceOff}')]] 28 '$i18nPolymer{deviceOn}', '$i18nPolymer{deviceOff}')]]
29 </div> 29 </div>
30 </div> 30 </div>
31 <cr-policy-pref-indicator icon-aria-label="$i18n{bluetoothPageTitle}" 31 <cr-policy-pref-indicator icon-aria-label="$i18n{bluetoothPageTitle}"
32 pref="[[prefs.cros.device.allow_bluetooth]]" 32 pref="[[prefs.cros.device.allow_bluetooth]]"
33 hidden="[[prefs.cros.device.allow_bluetooth.value]]"> 33 hidden="[[prefs.cros.device.allow_bluetooth.value]]">
34 </cr-policy-pref-indicator> 34 </cr-policy-pref-indicator>
35 <template is="dom-if" if="[[bluetoothEnabled_]]"> 35 <template is="dom-if" if="[[bluetoothEnabled_]]">
36 <button class="subpage-arrow" is="paper-icon-button-light" 36 <button class="subpage-arrow" is="paper-icon-button-light"
37 on-tap="onSubpageArrowTap_" 37 on-tap="onSubpageArrowTap_"
38 aria-label="$i18n{bluetoothPageTitle}" 38 aria-label="$i18n{bluetoothPageTitle}"
39 aria-describedby="bluetoothSecondary"> 39 aria-describedby="bluetoothSecondary">
40 </button> 40 </button>
41 </template> 41 </template>
42 <div class="secondary-action"> 42 <div class="secondary-action">
43 <paper-toggle-button id="enableBluetooth" 43 <paper-toggle-button id="enableBluetooth"
44 checked="{{bluetoothEnabled_}}" 44 checked="{{bluetoothToggleState_}}"
45 disabled="[[!adapterState_.available]]" on-tap="stopTap_" 45 disabled$="[[bluetoothToggleDisabled_]]" on-tap="stopTap_"
46 aria-label="$i18n{bluetoothToggleA11yLabel}"> 46 aria-label="$i18n{bluetoothToggleA11yLabel}">
47 </paper-toggle-button> 47 </paper-toggle-button>
48 </div> 48 </div>
49 </div> 49 </div>
50 </neon-animatable> 50 </neon-animatable>
51 51
52 <template is="dom-if" route-path="/bluetoothDevices"> 52 <template is="dom-if" route-path="/bluetoothDevices">
53 <settings-subpage associated-control="[[$$('#bluetoothDevices')]]" 53 <settings-subpage associated-control="[[$$('#bluetoothDevices')]]"
54 page-title="$i18n{bluetoothPageTitle}"> 54 page-title="$i18n{bluetoothPageTitle}">
55 <settings-bluetooth-subpage 55 <settings-bluetooth-subpage
56 adapter-state="[[adapterState_]]" 56 adapter-state="[[adapterState_]]"
57 bluetooth-enabled="{{bluetoothEnabled_}}" 57 bluetooth-toggle-state="{{bluetoothToggleState_}}"
58 bluetooth-toggle-disabled="[[bluetoothToggleDisabled_]]"
58 bluetooth="[[bluetooth]]" 59 bluetooth="[[bluetooth]]"
59 bluetooth-private="[[bluetoothPrivate]]"> 60 bluetooth-private="[[bluetoothPrivate]]">
60 </settings-bluetooth-subpage> 61 </settings-bluetooth-subpage>
61 </settings-subpage> 62 </settings-subpage>
62 </template> 63 </template>
63 64
64 </settings-animated-pages> 65 </settings-animated-pages>
65 </template> 66 </template>
66 <script src="bluetooth_page.js"></script> 67 <script src="bluetooth_page.js"></script>
67 </dom-module> 68 </dom-module>
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/settings/bluetooth_page/bluetooth_page.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698