Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2013 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 cr.define('options', function() { | |
| 6 var OptionsPage = options.OptionsPage; | |
| 7 | |
| 8 /** | |
| 9 * GeolocationOptions class | |
|
vadimt
2013/06/07 00:56:07
It would help to end sentences with '.'.
robliao
2013/06/07 07:34:36
Done.
| |
| 10 * Shows the component geolocation option when Google Now is enabled | |
|
vadimt
2013/06/07 00:56:07
'when Google Now is enabled' belongs to the logic
robliao
2013/06/07 07:34:36
Done.
| |
| 11 * @constructor | |
| 12 * @class | |
| 13 */ | |
| 14 function GeolocationOptions() { | |
| 15 OptionsPage.call(this, | |
|
vadimt
2013/06/07 00:56:07
Curious: what does this call do?
robliao
2013/06/07 07:34:36
This initializes the our "parent class". The other
robliao
2013/06/07 07:34:36
Done.
vadimt
2013/06/07 17:16:28
No need to additionally add "done" comments when y
| |
| 16 'geolocationOptions', | |
| 17 loadTimeData.getString('geolocationOptionsPageTabTitle'), | |
| 18 'geolocation-options'); | |
| 19 }; | |
| 20 | |
| 21 cr.addSingletonGetter(GeolocationOptions); | |
| 22 | |
| 23 GeolocationOptions.prototype = { | |
| 24 __proto__: OptionsPage.prototype | |
| 25 }; | |
| 26 | |
| 27 GeolocationOptions.showGeolocationOption = function() { | |
| 28 var geolocationCheckboxContainer = $('geolocationCheckbox'); | |
| 29 if (geolocationCheckboxContainer) { | |
|
vadimt
2013/06/07 00:56:07
No need in curlies.
robliao
2013/06/07 07:34:36
The Google JS style guide is written with curlies
robliao
2013/06/07 07:34:36
Done.
vadimt
2013/06/07 17:16:28
I'm OK with this; however reviewers used to requir
| |
| 30 geolocationCheckboxContainer.hidden = false; | |
| 31 } | |
| 32 }; | |
| 33 | |
| 34 return { GeolocationOptions: GeolocationOptions }; | |
|
vadimt
2013/06/07 00:56:07
return {GeolocationOptions: GeolocationOptions};
robliao
2013/06/07 07:34:36
I went ahead and matched the style in the other fi
robliao
2013/06/07 07:34:36
Done.
vadimt
2013/06/07 17:16:28
Your choice, but if it fits in 1 line, you could a
| |
| 35 }); | |
| OLD | NEW |