Index: chrome/browser/ui/webui/print_preview/print_preview_handler.h |
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.h b/chrome/browser/ui/webui/print_preview/print_preview_handler.h |
index 71658a7a1e677d5602b06a821280df3534daa9c9..788d99a0fe25fa4f4e70486753a55e7db494a495 100644 |
--- a/chrome/browser/ui/webui/print_preview/print_preview_handler.h |
+++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.h |
@@ -115,6 +115,9 @@ class PrintPreviewHandler : public content::WebUIMessageHandler, |
// |args| is unused. |
void HandleSignin(const base::ListValue* args); |
+ // Generates new token and sends back to UI. |
+ void HandleGetAccessToken(const base::ListValue* args); |
+ |
// Brings up a web page to allow the user to configure cloud print. |
// |args| is unused. |
void HandleManageCloudPrint(const base::ListValue* args); |
@@ -151,6 +154,10 @@ class PrintPreviewHandler : public content::WebUIMessageHandler, |
const std::string& default_printer, |
const std::string& cloud_print_data); |
+ // Send OAuth2 access token. |
+ void SendAccessToken(const std::string& type, |
+ const std::string& access_token); |
+ |
// Sends the printer capabilities to the Web UI. |settings_info| contains |
// printer capabilities information. |
void SendPrinterCapabilities(const base::DictionaryValue& settings_info); |
@@ -198,6 +205,8 @@ class PrintPreviewHandler : public content::WebUIMessageHandler, |
bool GetPreviewDataAndTitle(scoped_refptr<base::RefCountedBytes>* data, |
string16* title) const; |
+ void InitTokenService(); |
+ |
// Pointer to current print system. |
scoped_refptr<printing::PrintBackend> print_backend_; |
@@ -222,6 +231,10 @@ class PrintPreviewHandler : public content::WebUIMessageHandler, |
// exists. |
scoped_ptr<base::FilePath> print_to_pdf_path_; |
+ // Holds token service to get OAuth2 access tokens. |
+ class AccessTokenService; |
+ scoped_ptr<AccessTokenService> token_service_; |
+ |
DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); |
}; |