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

Side by Side Diff: chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.h

Issue 23530007: Move API flows for cloud print into common class CloudPrintBaseApiFlow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: AppendQueryParameter Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_UI_WEBUI_LOCAL_DISCOVERY_LOCAL_DISCOVERY_UI_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_LOCAL_DISCOVERY_LOCAL_DISCOVERY_UI_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_LOCAL_DISCOVERY_LOCAL_DISCOVERY_UI_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_LOCAL_DISCOVERY_LOCAL_DISCOVERY_UI_HANDLER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "chrome/browser/local_discovery/cloud_print_account_manager.h" 12 #include "chrome/browser/local_discovery/cloud_print_account_manager.h"
13 #include "chrome/browser/local_discovery/privet_confirm_api_flow.h" 13 #include "chrome/browser/local_discovery/privet_confirm_api_flow.h"
14 #include "chrome/browser/local_discovery/privet_constants.h"
14 #include "chrome/browser/local_discovery/privet_device_lister.h" 15 #include "chrome/browser/local_discovery/privet_device_lister.h"
15 #include "chrome/browser/local_discovery/privet_http.h" 16 #include "chrome/browser/local_discovery/privet_http.h"
16 #include "chrome/browser/local_discovery/privet_http_asynchronous_factory.h" 17 #include "chrome/browser/local_discovery/privet_http_asynchronous_factory.h"
17 #include "chrome/browser/local_discovery/service_discovery_host_client.h" 18 #include "chrome/browser/local_discovery/service_discovery_host_client.h"
18 #include "chrome/common/local_discovery/service_discovery_client.h" 19 #include "chrome/common/local_discovery/service_discovery_client.h"
19 #include "content/public/browser/user_metrics.h" 20 #include "content/public/browser/user_metrics.h"
20 #include "content/public/browser/web_ui_message_handler.h" 21 #include "content/public/browser/web_ui_message_handler.h"
21 22
22 // TODO(noamsml): Factor out full registration flow into single class 23 // TODO(noamsml): Factor out full registration flow into single class
23 namespace local_discovery { 24 namespace local_discovery {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // For when a cancelation is made. 90 // For when a cancelation is made.
90 void HandleCancelRegistration(const base::ListValue* args); 91 void HandleCancelRegistration(const base::ListValue* args);
91 92
92 // For when the IP address of the printer has been resolved for registration. 93 // For when the IP address of the printer has been resolved for registration.
93 void StartRegisterHTTP( 94 void StartRegisterHTTP(
94 const std::string& user, 95 const std::string& user,
95 scoped_ptr<PrivetHTTPClient> http_client); 96 scoped_ptr<PrivetHTTPClient> http_client);
96 97
97 // For when the confirm operation on the cloudprint server has finished 98 // For when the confirm operation on the cloudprint server has finished
98 // executing. 99 // executing.
99 void OnConfirmDone(PrivetConfirmApiCallFlow::Status status); 100 void OnConfirmDone(CloudPrintBaseApiFlow::Status status);
100 101
101 // For when the cloud print account list is resolved. 102 // For when the cloud print account list is resolved.
102 void OnCloudPrintAccountsResolved(const std::vector<std::string>& accounts, 103 void OnCloudPrintAccountsResolved(const std::vector<std::string>& accounts,
103 const std::string& xsrf_token); 104 const std::string& xsrf_token);
104 105
105 // For when XSRF token is received for a secondary account. 106 // For when XSRF token is received for a secondary account.
106 void OnXSRFTokenForSecondaryAccount( 107 void OnXSRFTokenForSecondaryAccount(
107 const GURL& automated_claim_url, 108 const GURL& automated_claim_url,
108 const std::vector<std::string>& accounts, 109 const std::vector<std::string>& accounts,
109 const std::string& xsrf_token); 110 const std::string& xsrf_token);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 171
171 // Current user index (for multi-login), or kAccountIndexUseOAuth2 for sync 172 // Current user index (for multi-login), or kAccountIndexUseOAuth2 for sync
172 // credentials. 173 // credentials.
173 int current_register_user_index_; 174 int current_register_user_index_;
174 175
175 DISALLOW_COPY_AND_ASSIGN(LocalDiscoveryUIHandler); 176 DISALLOW_COPY_AND_ASSIGN(LocalDiscoveryUIHandler);
176 }; 177 };
177 178
178 } // namespace local_discovery 179 } // namespace local_discovery
179 #endif // CHROME_BROWSER_UI_WEBUI_LOCAL_DISCOVERY_LOCAL_DISCOVERY_UI_HANDLER_H_ 180 #endif // CHROME_BROWSER_UI_WEBUI_LOCAL_DISCOVERY_LOCAL_DISCOVERY_UI_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698