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

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

Issue 2965643004: MD Settings: Convert remaining classes to ES6 syntax. (Closed)
Patch Set: Fix Created 3 years, 5 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.exportPath('settings'); 5 cr.exportPath('settings');
6 6
7 /** @interface */ 7 cr.define('settings', function() {
8 settings.DirectionDelegate = function() {}; 8 /** @interface */
9 class DirectionDelegate {
10 /**
11 * @return {boolean} Whether the direction of the settings UI is
12 * right-to-left.
13 */
14 isRtl() {}
15 }
9 16
10 settings.DirectionDelegate.prototype = { 17 /** @implements {settings.DirectionDelegate} */
11 /** 18 class DirectionDelegateImpl {
12 * @return {boolean} Whether the direction of the settings UI is 19 /** @override */
13 * right-to-left. 20 isRtl() {
14 */ 21 return loadTimeData.getString('textdirection') == 'rtl';
15 isRtl: assertNotReached, 22 }
16 }; 23 }
17 24
18 /** 25 return {
19 * @implements {settings.DirectionDelegate} 26 DirectionDelegate: DirectionDelegate,
20 * @constructor 27 DirectionDelegateImpl: DirectionDelegateImpl,
21 */ 28 };
22 settings.DirectionDelegateImpl = function() {}; 29 });
23
24 settings.DirectionDelegateImpl.prototype = {
25 /** @override */
26 isRtl: function() {
27 return loadTimeData.getString('textdirection') == 'rtl';
28 },
29 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698