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

Unified Diff: chrome/browser/resources/md_user_manager/user_manager_tutorial.js

Issue 2600683002: Run tools/clang-format-js on some of chrome/browser/resources/ (Closed)
Patch Set: hackhackhack Created 3 years, 11 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/md_user_manager/user_manager_tutorial.js
diff --git a/chrome/browser/resources/md_user_manager/user_manager_tutorial.js b/chrome/browser/resources/md_user_manager/user_manager_tutorial.js
index a9da577e1e39c84db10ad34bf559634dbe08224d..304654c2bb3767bc102df1a1c5a24c93afe317d6 100644
--- a/chrome/browser/resources/md_user_manager/user_manager_tutorial.js
+++ b/chrome/browser/resources/md_user_manager/user_manager_tutorial.js
@@ -8,107 +8,97 @@
*/
(function() {
-/** @enum {string} */
-var TutorialSteps = {
- YOUR_CHROME: 'yourChrome',
- FRIENDS: 'friends',
- GUESTS: 'guests',
- COMPLETE: 'complete',
- NOT_YOU: 'notYou'
-};
+ /** @enum {string} */
+ var TutorialSteps = {
+ YOUR_CHROME: 'yourChrome',
+ FRIENDS: 'friends',
+ GUESTS: 'guests',
+ COMPLETE: 'complete',
+ NOT_YOU: 'notYou'
+ };
-Polymer({
- is: 'user-manager-tutorial',
+ Polymer({
+ is: 'user-manager-tutorial',
- properties: {
- /**
- * True if the tutorial is currently hidden.
- * @private {boolean}
- */
- hidden_: {
- type: Boolean,
- value: true
- },
+ properties: {
+ /**
+ * True if the tutorial is currently hidden.
+ * @private {boolean}
+ */
+ hidden_: {type: Boolean, value: true},
- /**
- * Current tutorial step ID.
- * @type {string}
- */
- currentStep_: {
- type: String,
- value: ''
+ /**
+ * Current tutorial step ID.
+ * @type {string}
+ */
+ currentStep_: {type: String, value: ''},
+
+ /**
+ * Enum values for the step IDs.
+ * @private {TutorialSteps}
+ */
+ steps_: {readOnly: true, type: Object, value: TutorialSteps}
},
/**
- * Enum values for the step IDs.
- * @private {TutorialSteps}
- */
- steps_: {
- readOnly: true,
- type: Object,
- value: TutorialSteps
- }
- },
-
- /**
* Determines whether a given step is displaying.
* @param {string} currentStep Index of the current step
* @param {string} step Name of the given step
* @return {boolean}
* @private
*/
- isStepHidden_: function(currentStep, step) {
- return currentStep != step;
- },
+ isStepHidden_: function(currentStep, step) {
+ return currentStep != step;
+ },
- /**
- * Navigates to the next step.
- * @param {!Event} event
- * @private
- */
- onNextTap_: function(event) {
- var element = Polymer.dom(event).rootTarget;
- this.currentStep_ = element.dataset.next;
- },
+ /**
+ * Navigates to the next step.
+ * @param {!Event} event
+ * @private
+ */
+ onNextTap_: function(event) {
+ var element = Polymer.dom(event).rootTarget;
+ this.currentStep_ = element.dataset.next;
+ },
- /**
- * Handler for the link in the last step. Takes user to the create-profile
- * page in order to add a new profile.
- * @param {!Event} event
- * @private
- */
- onAddUserTap_: function(event) {
- this.onDissmissTap_();
- // Event is caught by user-manager-pages.
- this.fire('change-page', {page: 'create-user-page'});
- },
+ /**
+ * Handler for the link in the last step. Takes user to the create-profile
+ * page in order to add a new profile.
+ * @param {!Event} event
+ * @private
+ */
+ onAddUserTap_: function(event) {
+ this.onDissmissTap_();
+ // Event is caught by user-manager-pages.
+ this.fire('change-page', {page: 'create-user-page'});
+ },
- /**
- * Starts the tutorial.
- */
- startTutorial: function() {
- this.currentStep_ = TutorialSteps.YOUR_CHROME;
- this.hidden_ = false;
+ /**
+ * Starts the tutorial.
+ */
+ startTutorial: function() {
+ this.currentStep_ = TutorialSteps.YOUR_CHROME;
+ this.hidden_ = false;
- // If there's only one pod, show the steps to the side of the pod.
- // Otherwise, center the steps and disable interacting with the pods
- // while the tutorial is showing.
- var podRow = /** @type {{focusPod: !function(), pods: !Array}} */
- ($('pod-row'));
+ // If there's only one pod, show the steps to the side of the pod.
+ // Otherwise, center the steps and disable interacting with the pods
+ // while the tutorial is showing.
+ var podRow = /** @type {{focusPod: !function(), pods: !Array}} */
+ ($('pod-row'));
- this.classList.toggle('single-pod', podRow.pods.length == 1);
+ this.classList.toggle('single-pod', podRow.pods.length == 1);
- podRow.focusPod(); // No focused pods.
- $('inner-container').classList.add('disabled');
- },
+ podRow.focusPod(); // No focused pods.
+ $('inner-container').classList.add('disabled');
+ },
- /**
- * Ends the tutorial.
- * @private
- */
- onDissmissTap_: function() {
- $('inner-container').classList.remove('disabled');
- this.hidden_ = true;
- }
-});
+ /**
+ * Ends the tutorial.
+ * @private
+ */
+ onDissmissTap_: function() {
+ $('inner-container').classList.remove('disabled');
+ this.hidden_ = true;
+ }
+ });
})();

Powered by Google App Engine
This is Rietveld 408576698