| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_PRINTING_CLOUD_PRINT_CLOUD_PRINT_SETUP_FLOW_H_ | 5 #ifndef CHROME_BROWSER_PRINTING_CLOUD_PRINT_CLOUD_PRINT_SETUP_FLOW_H_ |
| 6 #define CHROME_BROWSER_PRINTING_CLOUD_PRINT_CLOUD_PRINT_SETUP_FLOW_H_ | 6 #define CHROME_BROWSER_PRINTING_CLOUD_PRINT_CLOUD_PRINT_SETUP_FLOW_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "base/time.h" | 12 #include "base/time.h" |
| 13 #include "chrome/browser/ui/webui/web_dialog_ui.h" | 13 #include "ui/web_dialogs/web_dialog_ui.h" |
| 14 #include "chrome/common/net/gaia/gaia_auth_consumer.h" | 14 #include "chrome/common/net/gaia/gaia_auth_consumer.h" |
| 15 #include "chrome/common/net/gaia/gaia_auth_fetcher.h" | 15 #include "chrome/common/net/gaia/gaia_auth_fetcher.h" |
| 16 #include "chrome/common/net/gaia/google_service_auth_error.h" | 16 #include "chrome/common/net/gaia/google_service_auth_error.h" |
| 17 #include "grit/generated_resources.h" | 17 #include "grit/generated_resources.h" |
| 18 #include "ui/base/l10n/l10n_util.h" | 18 #include "ui/base/l10n/l10n_util.h" |
| 19 #include "ui/gfx/native_widget_types.h" | 19 #include "ui/gfx/native_widget_types.h" |
| 20 | 20 |
| 21 class CloudPrintServiceProcessHelper; | 21 class CloudPrintServiceProcessHelper; |
| 22 class CloudPrintSetupMessageHandler; | 22 class CloudPrintSetupMessageHandler; |
| 23 class GaiaAuthFetcher; | 23 class GaiaAuthFetcher; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 38 // 2. Providing the URL for the content of the dialog. | 38 // 2. Providing the URL for the content of the dialog. |
| 39 // 3. Providing a data source to provide the content HTML files. | 39 // 3. Providing a data source to provide the content HTML files. |
| 40 // 4. Providing a message handler to handle user actions in the Web UI. | 40 // 4. Providing a message handler to handle user actions in the Web UI. |
| 41 // 5. Responding to actions received in the message handler. | 41 // 5. Responding to actions received in the message handler. |
| 42 // | 42 // |
| 43 // The architecture for WebUI is designed such that only the message handler | 43 // The architecture for WebUI is designed such that only the message handler |
| 44 // can access the WebUI. This splits the flow control across the message | 44 // can access the WebUI. This splits the flow control across the message |
| 45 // handler and this class. In order to centralize all the flow control and | 45 // handler and this class. In order to centralize all the flow control and |
| 46 // content in the WebUI, the WebUI object is given to this object by the | 46 // content in the WebUI, the WebUI object is given to this object by the |
| 47 // message handler through the Attach(WebUI*) method. | 47 // message handler through the Attach(WebUI*) method. |
| 48 class CloudPrintSetupFlow : public WebDialogDelegate, | 48 class CloudPrintSetupFlow : public views::WebDialogDelegate, |
| 49 public GaiaAuthConsumer { | 49 public GaiaAuthConsumer { |
| 50 public: | 50 public: |
| 51 class Delegate { | 51 class Delegate { |
| 52 public: | 52 public: |
| 53 virtual ~Delegate() {} | 53 virtual ~Delegate() {} |
| 54 // Called when the setup dialog is closed. | 54 // Called when the setup dialog is closed. |
| 55 virtual void OnDialogClosed() = 0; | 55 virtual void OnDialogClosed() = 0; |
| 56 }; | 56 }; |
| 57 virtual ~CloudPrintSetupFlow(); | 57 virtual ~CloudPrintSetupFlow(); |
| 58 | 58 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 bool setup_done_; | 143 bool setup_done_; |
| 144 | 144 |
| 145 // Handle to the ServiceProcessControl which talks to the service process. | 145 // Handle to the ServiceProcessControl which talks to the service process. |
| 146 ServiceProcessControl* process_control_; | 146 ServiceProcessControl* process_control_; |
| 147 base::WeakPtr<Delegate> delegate_; | 147 base::WeakPtr<Delegate> delegate_; |
| 148 | 148 |
| 149 DISALLOW_COPY_AND_ASSIGN(CloudPrintSetupFlow); | 149 DISALLOW_COPY_AND_ASSIGN(CloudPrintSetupFlow); |
| 150 }; | 150 }; |
| 151 | 151 |
| 152 #endif // CHROME_BROWSER_PRINTING_CLOUD_PRINT_CLOUD_PRINT_SETUP_FLOW_H_ | 152 #endif // CHROME_BROWSER_PRINTING_CLOUD_PRINT_CLOUD_PRINT_SETUP_FLOW_H_ |
| OLD | NEW |