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 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 116 |
117 // The following methods control which iframe is visible. | 117 // The following methods control which iframe is visible. |
118 void ShowGaiaLogin(const base::DictionaryValue& args); | 118 void ShowGaiaLogin(const base::DictionaryValue& args); |
119 void ShowGaiaSuccessAndSettingUp(); | 119 void ShowGaiaSuccessAndSettingUp(); |
120 void ShowGaiaFailed(const GoogleServiceAuthError& error); | 120 void ShowGaiaFailed(const GoogleServiceAuthError& error); |
121 void ShowSetupDone(); | 121 void ShowSetupDone(); |
122 void ExecuteJavascriptInIFrame(const string16& iframe_xpath, | 122 void ExecuteJavascriptInIFrame(const string16& iframe_xpath, |
123 const string16& js); | 123 const string16& js); |
124 | 124 |
125 // Pointer to the Web UI. This is provided by CloudPrintSetupMessageHandler | 125 // Pointer to the Web UI. This is provided by CloudPrintSetupMessageHandler |
126 // when attached. We do not own the pointer, instead WebUI owns it's delegate | 126 // when attached. We do not own the pointer, instead WebUI owns its delegate |
127 // (us) and controls our lifetime. | 127 // (us) and controls our lifetime. |
128 content::WebUI* web_ui_; | 128 content::WebUI* web_ui_; |
129 | 129 |
130 // The args to pass to the initial page. | 130 // The args to pass to the initial page. |
131 std::string dialog_start_args_; | 131 std::string dialog_start_args_; |
132 Profile* profile_; | 132 Profile* profile_; |
133 | 133 |
134 // Fetcher to obtain the Cloud Print token. | 134 // Fetcher to obtain the Cloud Print token. |
135 scoped_ptr<GaiaAuthFetcher> authenticator_; | 135 scoped_ptr<GaiaAuthFetcher> authenticator_; |
136 std::string login_; | 136 std::string login_; |
137 std::string lsid_; | 137 std::string lsid_; |
138 | 138 |
139 // The last captcha or error state encountered. | 139 // The last captcha or error state encountered. |
140 GoogleServiceAuthError last_auth_error_; | 140 GoogleServiceAuthError last_auth_error_; |
141 | 141 |
142 // Are we in the done state? | 142 // Are we in the done state? |
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 |