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

Side by Side Diff: chrome/browser/resources/chromeos/arc_support/background.js

Issue 2257073002: Revert of arc: avoid checkbox AutomationNode issue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/chromeos/arc_support/main.css » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * UI Pages. Note the order must be in sync with the ArcAuthService::UIPage 6 * UI Pages. Note the order must be in sync with the ArcAuthService::UIPage
7 * enum. 7 * enum.
8 * @type {Array<string>} 8 * @type {Array<string>}
9 */ 9 */
10 var UI_PAGES = ['none', 10 var UI_PAGES = ['none',
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 /** 142 /**
143 * Sets current metrics mode. 143 * Sets current metrics mode.
144 * @param {string} text Describes current metrics state. 144 * @param {string} text Describes current metrics state.
145 * @param {boolean} canEnable Defines if user is allowed to change this metrics 145 * @param {boolean} canEnable Defines if user is allowed to change this metrics
146 * option. 146 * option.
147 * @param {boolean} on Defines if metrics are active currently. 147 * @param {boolean} on Defines if metrics are active currently.
148 */ 148 */
149 function setMetricsMode(text, canEnable, on) { 149 function setMetricsMode(text, canEnable, on) {
150 var doc = appWindow.contentWindow.document; 150 var doc = appWindow.contentWindow.document;
151 var enableMetrics = doc.getElementById('enable-metrics'); 151 var enableMetrics = doc.getElementById('enable-metrics');
152 enableMetrics.hidden = !canEnable; 152 var enableMetricsContainer = doc.getElementById('enable-metrics-container');
153 enableMetricsContainer.hidden = !canEnable;
153 enableMetrics.checked = on; 154 enableMetrics.checked = on;
154 155
155 var onSettings = function(event) { 156 var onSettings = function(event) {
156 chrome.browser.openTab({'url': 'chrome://settings'}, function() {}); 157 chrome.browser.openTab({'url': 'chrome://settings'}, function() {});
157 event.preventDefault(); 158 event.preventDefault();
158 }; 159 };
159 160
160 doc.getElementById('text-metrics').innerHTML = text; 161 doc.getElementById('text-metrics').innerHTML = text;
161 doc.getElementById('settings-link').addEventListener('click', onSettings); 162 doc.getElementById('settings-link').addEventListener('click', onSettings);
162 doc.getElementById('learn-more-link-metrics').addEventListener('click', 163 doc.getElementById('learn-more-link-metrics').addEventListener('click',
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 type: 'chrome', 562 type: 'chrome',
562 color: '#ffffff' 563 color: '#ffffff'
563 }, 564 },
564 'innerBounds': { 565 'innerBounds': {
565 'width': INNER_WIDTH, 566 'width': INNER_WIDTH,
566 'height': INNER_HEIGHT 567 'height': INNER_HEIGHT
567 } 568 }
568 }; 569 };
569 chrome.app.window.create('main.html', options, onWindowCreated); 570 chrome.app.window.create('main.html', options, onWindowCreated);
570 }); 571 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/arc_support/main.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698