| Index: chrome/browser/resources/file_manager/js/suggest_apps_dialog.js
|
| diff --git a/chrome/browser/resources/file_manager/js/suggest_apps_dialog.js b/chrome/browser/resources/file_manager/js/suggest_apps_dialog.js
|
| index 3ddc2e32af32a679b98a8575b4bf12e5b4e77bb3..64a21607e7b488570c25483065e1f609e6d92a55 100644
|
| --- a/chrome/browser/resources/file_manager/js/suggest_apps_dialog.js
|
| +++ b/chrome/browser/resources/file_manager/js/suggest_apps_dialog.js
|
| @@ -203,6 +203,8 @@ SuggestAppsDialog.prototype.onInputFocus = function() {
|
|
|
| /**
|
| * Injects headers into the passed request.
|
| + * TODO(yoshiki): Removes this method after the CWS widget supports the access
|
| + * token in 'initialization' message.
|
| *
|
| * @param {Event} e Request event.
|
| * @return {{requestHeaders: HttpHeaders}} Modified headers.
|
| @@ -277,6 +279,9 @@ SuggestAppsDialog.prototype.show = function(extension, mime, onDialogClosed) {
|
| this.webviewContainer_.style.height = SPINNER_HEIGHT + 'px';
|
|
|
| this.webview_ = this.container_.querySelector('#cws-widget');
|
| +
|
| + // TODO(yoshiki): Removes the 'Authentication' header after the CWS widget
|
| + // supports the access token in 'initialization' message.
|
| this.webview_.request.onBeforeSendHeaders.addListener(
|
| this.authorizeRequest_.bind(this),
|
| {urls: [this.widgetOrigin_ + '/*']},
|
| @@ -288,7 +293,8 @@ SuggestAppsDialog.prototype.show = function(extension, mime, onDialogClosed) {
|
| this.webview_,
|
| extension, mime,
|
| WEBVIEW_WIDTH, WEBVIEW_HEIGHT,
|
| - this.widgetUrl_, this.widgetOrigin_);
|
| + this.widgetUrl_, this.widgetOrigin_,
|
| + this.accessToken_);
|
| this.webviewClient_.addEventListener(CWSContainerClient.Events.LOADED,
|
| this.onWidgetLoaded_.bind(this));
|
| this.webviewClient_.addEventListener(CWSContainerClient.Events.LOAD_FAILED,
|
|
|