OLD | NEW |
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 #include "chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.h" | 5 #include "chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 const base::ListValue* args) { | 225 const base::ListValue* args) { |
226 ResetCurrentRegistration(); | 226 ResetCurrentRegistration(); |
227 } | 227 } |
228 | 228 |
229 void LocalDiscoveryUIHandler::HandleRequestDeviceList( | 229 void LocalDiscoveryUIHandler::HandleRequestDeviceList( |
230 const base::ListValue* args) { | 230 const base::ListValue* args) { |
231 failed_list_count_ = 0; | 231 failed_list_count_ = 0; |
232 succeded_list_count_ = 0; | 232 succeded_list_count_ = 0; |
233 cloud_devices_.clear(); | 233 cloud_devices_.clear(); |
234 | 234 |
| 235 cloud_print_printer_list_ = CreateApiFlow(); |
| 236 |
235 if (cloud_print_printer_list_) { | 237 if (cloud_print_printer_list_) { |
236 cloud_print_printer_list_->Start( | 238 cloud_print_printer_list_->Start( |
237 make_scoped_ptr<GCDApiFlow::Request>(new CloudPrintPrinterList(this))); | 239 make_scoped_ptr<GCDApiFlow::Request>(new CloudPrintPrinterList(this))); |
238 } | 240 } |
239 | 241 |
240 CheckListingDone(); | 242 CheckListingDone(); |
241 } | 243 } |
242 | 244 |
243 void LocalDiscoveryUIHandler::HandleOpenCloudPrintURL( | 245 void LocalDiscoveryUIHandler::HandleOpenCloudPrintURL( |
244 const base::ListValue* args) { | 246 const base::ListValue* args) { |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
639 | 641 |
640 void LocalDiscoveryUIHandler::RefreshCloudPrintStatusFromService() { | 642 void LocalDiscoveryUIHandler::RefreshCloudPrintStatusFromService() { |
641 if (cloud_print_connector_ui_enabled_) | 643 if (cloud_print_connector_ui_enabled_) |
642 CloudPrintProxyServiceFactory::GetForProfile(Profile::FromWebUI(web_ui()))-> | 644 CloudPrintProxyServiceFactory::GetForProfile(Profile::FromWebUI(web_ui()))-> |
643 RefreshStatusFromService(); | 645 RefreshStatusFromService(); |
644 } | 646 } |
645 | 647 |
646 #endif // cloud print connector option stuff | 648 #endif // cloud print connector option stuff |
647 | 649 |
648 } // namespace local_discovery | 650 } // namespace local_discovery |
OLD | NEW |