Skip to content

Commit

Permalink
[CrOS MultiDevice] Change "Cancel" to "No thanks" in OOBE
Browse files Browse the repository at this point in the history
On the start setup page of OOBE, change the text of the cancel button to
read "No thanks" instead of "Cancel".

Screenshots:
OOBE: https://drive.google.com/open?id=1QjHg1_v1QFg1tph986Xi2igPUYG8nJlneA
post-OOBE: https://drive.google.com/open?id=1-hxQjU-WVMi8sAWNAZB-7LyrcX3F5ju5bQ

Bug: 893353
Change-Id: I748f282b392bccfe17bd14f8bc036cca786bb8f9
Tested: Manual; ./out/Default/browser_tests --gtest_filter=*MultiDevice*
Reviewed-on: https://chromium-review.googlesource.com/c/1272067
Commit-Queue: Josh Nohle <[email protected]>
Reviewed-by: Alexander Alekseev <[email protected]>
Reviewed-by: Kyle Horimoto <[email protected]>
Cr-Original-Commit-Position: refs/heads/master@{#599860}(cherry picked from commit 8c25763)
Reviewed-on: https://chromium-review.googlesource.com/c/1286873
Reviewed-by: Jeremy Klein <[email protected]>
Cr-Commit-Position: refs/branch-heads/3578@{#84}
Cr-Branched-From: 4226ddf-refs/heads/master@{#599034}
  • Loading branch information
nohle authored and Jeremy Klein committed Oct 17, 2018
1 parent 789d1f3 commit 13ded78
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ cr.define('multidevice_setup', function() {
shouldExitSetupFlowAfterSettingHost() {
return true;
}

/** @override */
getStartSetupCancelButtonTextId() {
return 'noThanks';
}
}

const MultiDeviceSetupFirstRun = Polymer({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ cr.define('multidevice_setup', function() {
shouldExitSetupFlowAfterSettingHost() {
return false;
}

/** @override */
getStartSetupCancelButtonTextId() {
return 'cancel';
}
}

return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ constexpr struct {
{"back", IDS_MULTIDEVICE_SETUP_BACK_LABEL},
{"cancel", IDS_CANCEL},
{"done", IDS_DONE},
{"noThanks", IDS_NO_THANKS},
{"passwordPageHeader", IDS_MULTIDEVICE_SETUP_PASSWORD_PAGE_HEADER},
{"enterPassword", IDS_MULTIDEVICE_SETUP_PASSWORD_PAGE_ENTER_PASSWORD_LABEL},
{"wrongPassword", IDS_MULTIDEVICE_SETUP_PASSWORD_PAGE_WRONG_PASSWORD_LABEL},
Expand Down
5 changes: 5 additions & 0 deletions chrome/test/data/webui/multidevice_setup/integration_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ cr.define('multidevice_setup', () => {
shouldExitSetupFlowAfterSettingHost() {
return this.shouldExitSetupFlowAfterSettingHost_;
}

/** @override */
getStartSetupCancelButtonTextId() {
return 'cancel';
}
}

/** @implements {multidevice_setup.MojoInterfaceProvider} */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
<setup-succeeded-page></setup-succeeded-page>
</template>
<start-setup-page devices="[[devices_]]"
selected-device-id="{{selectedDeviceId_}}">
selected-device-id="{{selectedDeviceId_}}"
delegate="[[delegate]]">
</start-setup-page>
</iron-pages>
<div class="flex"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ cr.define('multidevice_setup', function() {

/** @return {boolean} */
shouldExitSetupFlowAfterSettingHost() {}

/** @return {string} */
getStartSetupCancelButtonTextId() {}
}

return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Polymer({
/** Overridden from UiPageContainerBehavior. */
cancelButtonTextId: {
type: String,
value: 'cancel',
computed: 'getCancelButtonTextId_(delegate)',
},

/** Overridden from UiPageContainerBehavior. */
Expand Down Expand Up @@ -53,6 +53,12 @@ Polymer({
type: String,
notify: true,
},

/**
* Delegate object which performs differently in OOBE vs. non-OOBE mode.
* @type {!multidevice_setup.MultiDeviceSetupDelegate}
*/
delegate: Object,
},

behaviors: [
Expand Down Expand Up @@ -83,6 +89,15 @@ Polymer({
}
},

/**
* @param {!multidevice_setup.MultiDeviceSetupDelegate} delegate
* @return {string} The cancel button text ID, dependent on OOBE vs. non-OOBE.
* @private
*/
getCancelButtonTextId_: function(delegate) {
return this.delegate.getStartSetupCancelButtonTextId();
},

/**
* @param {!Array<!chromeos.deviceSync.mojom.RemoteDevice>} devices
* @return {string} Label for devices selection content.
Expand Down

0 comments on commit 13ded78

Please sign in to comment.