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

Side by Side Diff: chrome/browser/resources/options/route_stub.js

Issue 2236213002: Add quick unlock Settings in options page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pre-process i18n in options and trim route_stub.js 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4 //
5 // TODO(xiaoyinh@): This file is a stub class of
6 // chrome/browser/resources/settings/route.js. And it is used to integrate
7 // with the polymer elements in settings.
8 // It should be removed once we don't need to support options.
9
10 cr.define('settings', function() {
11 /**
12 * Class for navigable routes. May only be instantiated within this file.
13 * @constructor
14 * @param {string} path
15 * @private
16 */
17 var Route = function(path) {
18 this.path = path;
19 };
20
21 // Abbreviated variable for easier definitions.
22 var r = Route;
23
24 // Root pages.
25 r.BASIC = new Route('/');
26 r.PEOPLE = r.BASIC;
27 r.LOCK_SCREEN = new Route('/quickUnlockConfigureOverlay');
28
29 /** @polymerBehavior */
30 var RouteObserverBehavior = {};
31
32 var currentRoute_ = Route.BASIC;
33
34 var getCurrentRoute = function() { return currentRoute_; };
35
36 var navigateTo = function(route) {
37 currentRoute_ = route;
38 if ($('lock-screen')) {
39 $('lock-screen').currentRouteChanged();
40 }
41 };
42
43 return {
44 Route: Route,
45 RouteObserverBehavior: RouteObserverBehavior,
46 getCurrentRoute: getCurrentRoute,
47 navigateTo: navigateTo,
48 };
49 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698