OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_PRINTING_CLOUD_PRINT_CLOUD_PRINT_SETUP_MESSAGE_HANDLER_H_ |
| 6 #define CHROME_BROWSER_PRINTING_CLOUD_PRINT_CLOUD_PRINT_SETUP_MESSAGE_HANDLER_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/values.h" |
| 11 #include "chrome/browser/dom_ui/html_dialog_ui.h" |
| 12 |
| 13 class CloudPrintSetupFlow; |
| 14 |
| 15 // This class is used to handle DOM messages from the setup dialog. |
| 16 class CloudPrintSetupMessageHandler : public DOMMessageHandler { |
| 17 public: |
| 18 explicit CloudPrintSetupMessageHandler(CloudPrintSetupFlow* flow) |
| 19 : flow_(flow) {} |
| 20 virtual ~CloudPrintSetupMessageHandler() {} |
| 21 |
| 22 // DOMMessageHandler implementation. |
| 23 virtual DOMMessageHandler* Attach(DOMUI* dom_ui); |
| 24 |
| 25 protected: |
| 26 // DOMMessageHandler implementation. |
| 27 virtual void RegisterMessages(); |
| 28 |
| 29 // Callbacks from the page. |
| 30 void HandleSubmitAuth(const ListValue* args); |
| 31 |
| 32 private: |
| 33 CloudPrintSetupFlow* flow_; |
| 34 |
| 35 DISALLOW_COPY_AND_ASSIGN(CloudPrintSetupMessageHandler); |
| 36 }; |
| 37 |
| 38 #endif // CHROME_BROWSER_PRINTING_CLOUD_PRINT_CLOUD_PRINT_SETUP_MESSAGE_HANDLER
_H_ |
OLD | NEW |