| Index: chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
|
| diff --git a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
|
| index 1abb0d4a661cfaf1ef3c536d4e87b939fe73723b..624d10ac4002cbcfd597790c07fb12d750a385ad 100644
|
| --- a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
|
| +++ b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
|
| @@ -121,37 +121,6 @@ Polymer({
|
| },
|
|
|
| /**
|
| - * The localized strings used by |this|.
|
| - * @private {!Object}
|
| - */
|
| - i18n_: {
|
| - readOnly: true,
|
| - type: Object,
|
| - value: function() {
|
| - var strings = {};
|
| - [
|
| - 'deviceMissingText',
|
| - 'firstRunFlowButtonText',
|
| - 'firstRunFlowCloudPrefText',
|
| - 'firstRunFlowText',
|
| - 'firstRunFlowTitle',
|
| - 'issueHeaderText',
|
| - 'learnMoreText',
|
| - 'searchButtonTitle',
|
| - 'searchInputLabel',
|
| - 'searchNoMatchesText',
|
| - 'selectCastModeHeaderText',
|
| - 'shareYourScreenSubheadingText',
|
| - ]
|
| - .forEach(function(s) {
|
| - strings[s] = loadTimeData.valueExists(s) ?
|
| - loadTimeData.getString(s) : '';
|
| - });
|
| - return strings;
|
| - },
|
| - },
|
| -
|
| - /**
|
| * Whether the search input is currently focused. This is used to prevent
|
| * window focus/blur events from interfering with input-focus-dependent
|
| * operations.
|
| @@ -388,6 +357,10 @@ Polymer({
|
| },
|
| },
|
|
|
| + behaviors: [
|
| + I18nBehavior,
|
| + ],
|
| +
|
| listeners: {
|
| 'focus': 'onFocus_',
|
| 'header-height-changed': 'updateElementPositioning_',
|
| @@ -641,9 +614,9 @@ Polymer({
|
| computeHeaderText_: function(view, headerText) {
|
| switch (view) {
|
| case media_router.MediaRouterView.CAST_MODE_LIST:
|
| - return this.i18n_['selectCastModeHeaderText'];
|
| + return this.i18n('selectCastModeHeaderText');
|
| case media_router.MediaRouterView.ISSUE:
|
| - return this.i18n_['issueHeaderText'];
|
| + return this.i18n('issueHeaderText');
|
| case media_router.MediaRouterView.ROUTE_DETAILS:
|
| return this.currentRoute_ ?
|
| this.sinkMap_[this.currentRoute_.sinkId].name : '';
|
| @@ -1042,6 +1015,17 @@ Polymer({
|
| },
|
|
|
| /**
|
| + * Retrieves the first run flow cloud preferences text, if it exists. On
|
| + * non-officially branded builds, the string is not defined.
|
| + *
|
| + * @return {string} Cloud preferences text.
|
| + */
|
| + getFirstRunFlowCloudPrefText_: function() {
|
| + return loadTimeData.valueExists('firstRunFlowCloudPrefText') ?
|
| + this.i18n('firstRunFlowCloudPrefText') : '';
|
| + },
|
| +
|
| + /**
|
| * Returns whether given string is undefined, null, empty, or whitespace only.
|
| * @param {?string} str String to be tested.
|
| * @return {boolean} |true| if the string is undefined, null, empty, or
|
|
|