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

Unified Diff: chrome/browser/resources/options/website_settings_edit_page.js

Issue 501063002: Surface battery auditing information on the website settings option page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@origin-power-map
Patch Set: Rebase. Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/options/website_settings_edit_page.js
diff --git a/chrome/browser/resources/options/website_settings_edit_page.js b/chrome/browser/resources/options/website_settings_edit_page.js
index 07bcb324aa2216b626826aa8a3d97f708152ee64..deba565ef7b202aede7f26b428aba5456964d49a 100644
--- a/chrome/browser/resources/options/website_settings_edit_page.js
+++ b/chrome/browser/resources/options/website_settings_edit_page.js
@@ -34,6 +34,10 @@ cr.define('options.WebsiteSettings', function() {
chrome.send('deleteLocalStorage');
};
+ $('website-settings-battery-stop-button').onclick = function(event) {
+ chrome.send('stopOrigin');
+ };
+
$('websiteSettingsEditorCancelButton').onclick =
PageManager.closeOverlay.bind(PageManager);
@@ -61,13 +65,16 @@ cr.define('options.WebsiteSettings', function() {
/**
* Populates and displays the page with given origin information.
* @param {string} localStorage A string describing the local storage use.
+ * @param {string} batteryUsage A string describing the battery use.
* @param {Object} permissions A dictionary of permissions to their
* available and current settings, and if it is editable.
* @param {boolean} showPage If the page should raised.
* @private
*/
- populateOrigin_: function(localStorage, permissions, showPage) {
+ populateOrigin_: function(localStorage, batteryUsage, permissions,
+ showPage) {
$('local-storage-title').textContent = localStorage;
+ $('battery-title').textContent = batteryUsage;
for (var key in permissions) {
var selector = $(key + '-select-option');
@@ -98,9 +105,10 @@ cr.define('options.WebsiteSettings', function() {
},
};
- WebsiteSettingsEditor.populateOrigin = function(localStorage, permissions,
- showPage) {
+ WebsiteSettingsEditor.populateOrigin = function(localStorage, batteryUsage,
+ permissions, showPage) {
WebsiteSettingsEditor.getInstance().populateOrigin_(localStorage,
+ batteryUsage,
permissions,
showPage);
};
« no previous file with comments | « chrome/browser/resources/options/website_settings.js ('k') | chrome/browser/resources/options/website_settings_edit_site.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698