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

Side by Side Diff: chrome/browser/resources/settings/route.js

Issue 2271843002: Settings People: Add /signOut route for Disconnect dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update test Created 4 years, 3 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 // 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 cr.define('settings', function() { 5 cr.define('settings', function() {
6 /** 6 /**
7 * Class for navigable routes. May only be instantiated within this file. 7 * Class for navigable routes. May only be instantiated within this file.
8 * @constructor 8 * @constructor
9 * @param {string} path 9 * @param {string} path
10 * @private 10 * @private
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 }; 84 };
85 85
86 // Abbreviated variable for easier definitions. 86 // Abbreviated variable for easier definitions.
87 var r = Route; 87 var r = Route;
88 88
89 // Root pages. 89 // Root pages.
90 r.BASIC = new Route('/'); 90 r.BASIC = new Route('/');
91 r.ADVANCED = new Route('/advanced'); 91 r.ADVANCED = new Route('/advanced');
92 r.ABOUT = new Route('/help'); 92 r.ABOUT = new Route('/help');
93 93
94 // Navigable dialogs. These are the only non-section children of root pages.
95 // These are disfavored. If we add anymore, we should add explicit support.
96 r.SIGN_OUT = r.BASIC.createChild('/signOut');
97 r.CLEAR_BROWSER_DATA = r.ADVANCED.createChild('/clearBrowserData');
98
94 <if expr="chromeos"> 99 <if expr="chromeos">
95 r.INTERNET = r.BASIC.createSection('/internet', 'internet'); 100 r.INTERNET = r.BASIC.createSection('/internet', 'internet');
96 r.NETWORK_DETAIL = r.INTERNET.createChild('/networkDetail'); 101 r.NETWORK_DETAIL = r.INTERNET.createChild('/networkDetail');
97 r.KNOWN_NETWORKS = r.INTERNET.createChild('/knownNetworks'); 102 r.KNOWN_NETWORKS = r.INTERNET.createChild('/knownNetworks');
98 </if> 103 </if>
99 104
100 r.APPEARANCE = r.BASIC.createSection('/appearance', 'appearance'); 105 r.APPEARANCE = r.BASIC.createSection('/appearance', 'appearance');
101 r.FONTS = r.APPEARANCE.createChild('/fonts'); 106 r.FONTS = r.APPEARANCE.createChild('/fonts');
102 107
103 r.DEFAULT_BROWSER = 108 r.DEFAULT_BROWSER =
(...skipping 17 matching lines...) Expand all
121 r.DEVICE = r.BASIC.createSection('/device', 'device'); 126 r.DEVICE = r.BASIC.createSection('/device', 'device');
122 r.POINTERS = r.DEVICE.createChild('/pointer-overlay'); 127 r.POINTERS = r.DEVICE.createChild('/pointer-overlay');
123 r.KEYBOARD = r.DEVICE.createChild('/keyboard-overlay'); 128 r.KEYBOARD = r.DEVICE.createChild('/keyboard-overlay');
124 r.DISPLAY = r.DEVICE.createChild('/display'); 129 r.DISPLAY = r.DEVICE.createChild('/display');
125 r.NOTES = r.DEVICE.createChild('/note'); 130 r.NOTES = r.DEVICE.createChild('/note');
126 </if> 131 </if>
127 132
128 r.PRIVACY = r.ADVANCED.createSection('/privacy', 'privacy'); 133 r.PRIVACY = r.ADVANCED.createSection('/privacy', 'privacy');
129 r.CERTIFICATES = r.PRIVACY.createChild('/certificates'); 134 r.CERTIFICATES = r.PRIVACY.createChild('/certificates');
130 135
131 // CLEAR_BROWSER_DATA is the only navigable dialog route. It's the only child
132 // of a root page that's not a section. Don't add any more routes like these.
133 // If more navigable dialogs are needed, add explicit support in Route.
134 r.CLEAR_BROWSER_DATA = r.ADVANCED.createChild('/clearBrowserData');
135
136 r.SITE_SETTINGS = r.PRIVACY.createChild('/siteSettings'); 136 r.SITE_SETTINGS = r.PRIVACY.createChild('/siteSettings');
137 r.SITE_SETTINGS_ALL = r.SITE_SETTINGS.createChild('all'); 137 r.SITE_SETTINGS_ALL = r.SITE_SETTINGS.createChild('all');
138 r.SITE_SETTINGS_SITE_DETAILS = 138 r.SITE_SETTINGS_SITE_DETAILS =
139 r.SITE_SETTINGS_ALL.createChild('/siteSettings/siteDetails'); 139 r.SITE_SETTINGS_ALL.createChild('/siteSettings/siteDetails');
140 140
141 r.SITE_SETTINGS_HANDLERS = r.SITE_SETTINGS.createChild('handlers'); 141 r.SITE_SETTINGS_HANDLERS = r.SITE_SETTINGS.createChild('handlers');
142 142
143 // TODO(tommycli): Find a way to refactor these repetitive category routes. 143 // TODO(tommycli): Find a way to refactor these repetitive category routes.
144 r.SITE_SETTINGS_AUTOMATIC_DOWNLOADS = 144 r.SITE_SETTINGS_AUTOMATIC_DOWNLOADS =
145 r.SITE_SETTINGS.createChild('automaticDownloads'); 145 r.SITE_SETTINGS.createChild('automaticDownloads');
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 Route: Route, 341 Route: Route,
342 RouteObserverBehavior: RouteObserverBehavior, 342 RouteObserverBehavior: RouteObserverBehavior,
343 getRouteForPath: getRouteForPath, 343 getRouteForPath: getRouteForPath,
344 initializeRouteFromUrl: initializeRouteFromUrl, 344 initializeRouteFromUrl: initializeRouteFromUrl,
345 getCurrentRoute: getCurrentRoute, 345 getCurrentRoute: getCurrentRoute,
346 getQueryParameters: getQueryParameters, 346 getQueryParameters: getQueryParameters,
347 navigateTo: navigateTo, 347 navigateTo: navigateTo,
348 navigateToPreviousRoute: navigateToPreviousRoute, 348 navigateToPreviousRoute: navigateToPreviousRoute,
349 }; 349 };
350 }); 350 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/people_page/people_page.js ('k') | chrome/test/data/webui/settings/people_page_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698