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

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

Issue 3086017: Add tabs to passwords and exceptions subpage (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: add todo for mac Created 10 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/options_page.js
diff --git a/chrome/browser/resources/options/options_page.js b/chrome/browser/resources/options/options_page.js
index 868729eaf66de6d951cfe6b8705f44adc51fc445..62af762cb22b9856b66f6c58d1f25d4a58615c82 100644
--- a/chrome/browser/resources/options/options_page.js
+++ b/chrome/browser/resources/options/options_page.js
@@ -65,6 +65,25 @@ cr.define('options', function() {
};
/**
+ * Shows the tab contents for the given navigation tab.
+ * @param {!Element} tab The tab that the user clicked.
+ */
+ OptionsPage.showTab = function(tab) {
+ if (!tab.classList.contains('inactive-tab'))
+ return;
+
+ if (this.activeNavTab != null) {
+ this.activeNavTab.classList.remove('active-tab');
+ $(this.activeNavTab.getAttribute('tab-contents')).classList.
+ remove('active-tab-contents');
+ }
+
+ tab.classList.add('active-tab');
+ $(tab.getAttribute('tab-contents')).classList.add('active-tab-contents');
+ this.activeNavTab = tab;
+ }
+
+ /**
* Registers new options page.
* @param {OptionsPage} page Page to register.
*/
« no previous file with comments | « chrome/browser/resources/options/import_data_overlay.js ('k') | chrome/browser/resources/options/passwords_exceptions.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698