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

Unified Diff: trunk/src/chrome/browser/resources/print_preview/native_layer.js

Issue 13898008: Revert 194782 "Native api to get OAuth2 access tokens in Print P..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 8 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
« no previous file with comments | « no previous file | trunk/src/chrome/browser/ui/webui/print_preview/print_preview_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/chrome/browser/resources/print_preview/native_layer.js
===================================================================
--- trunk/src/chrome/browser/resources/print_preview/native_layer.js (revision 194799)
+++ trunk/src/chrome/browser/resources/print_preview/native_layer.js (working copy)
@@ -39,7 +39,6 @@
global['updatePrintPreview'] = this.onUpdatePrintPreview_.bind(this);
global['printScalingDisabledForSourcePDF'] =
this.onPrintScalingDisabledForSourcePDF_.bind(this);
- global['onDidGetAccessToken'] = this.onDidGetAccessToken_.bind(this);
};
/**
@@ -48,7 +47,6 @@
* @const
*/
NativeLayer.EventType = {
- ACCESS_TOKEN_READY: 'print_preview.NativeLayer.ACCESS_TOKEN_READY',
CAPABILITIES_SET: 'print_preview.NativeLayer.CAPABILITIES_SET',
CLOUD_PRINT_ENABLE: 'print_preview.NativeLayer.CLOUD_PRINT_ENABLE',
DESTINATIONS_RELOAD: 'print_preview.NativeLayer.DESTINATIONS_RELOAD',
@@ -102,14 +100,6 @@
NativeLayer.prototype = {
__proto__: cr.EventTarget.prototype,
- /**
- * Requests access token for cloud print requests.
- * @param {string} authType type of access token.
- */
- startGetAccessToken: function(authType) {
- chrome.send('getAccessToken', [authType]);
- },
-
/** Gets the initial settings to initialize the print preview with. */
startGetInitialSettings: function() {
chrome.send('getInitialSettings');
@@ -530,20 +520,6 @@
},
/**
- * Notification that access token is ready.
- * @param {string} authType Type of access token.
- * @param {string} accessToken Access token.
- * @private
- */
- onDidGetAccessToken_: function(authType, accessToken) {
- var getAccessTokenEvent = new cr.Event(
- NativeLayer.EventType.ACCESS_TOKEN_READY);
- getAccessTokenEvent.authType = authType;
- getAccessTokenEvent.accessToken = accessToken;
- this.dispatchEvent(getAccessTokenEvent);
- },
-
- /**
* Update the print preview when new preview data is available.
* Create the PDF plugin as needed.
* Called from PrintPreviewUI::PreviewDataIsAvailable().
« no previous file with comments | « no previous file | trunk/src/chrome/browser/ui/webui/print_preview/print_preview_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698