| 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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 ++succeded_list_count_; | 473 ++succeded_list_count_; |
| 474 CheckListingDone(); | 474 CheckListingDone(); |
| 475 } | 475 } |
| 476 | 476 |
| 477 void LocalDiscoveryUIHandler::OnDeviceListUnavailable() { | 477 void LocalDiscoveryUIHandler::OnDeviceListUnavailable() { |
| 478 ++failed_list_count_; | 478 ++failed_list_count_; |
| 479 CheckListingDone(); | 479 CheckListingDone(); |
| 480 } | 480 } |
| 481 | 481 |
| 482 void LocalDiscoveryUIHandler::GoogleSigninSucceeded( | 482 void LocalDiscoveryUIHandler::GoogleSigninSucceeded( |
| 483 const std::string& account_id, |
| 483 const std::string& username, | 484 const std::string& username, |
| 484 const std::string& password) { | 485 const std::string& password) { |
| 485 CheckUserLoggedIn(); | 486 CheckUserLoggedIn(); |
| 486 } | 487 } |
| 487 | 488 |
| 488 void LocalDiscoveryUIHandler::GoogleSignedOut(const std::string& username) { | 489 void LocalDiscoveryUIHandler::GoogleSignedOut(const std::string& account_id, |
| 490 const std::string& username) { |
| 489 CheckUserLoggedIn(); | 491 CheckUserLoggedIn(); |
| 490 } | 492 } |
| 491 | 493 |
| 492 void LocalDiscoveryUIHandler::SendRegisterError() { | 494 void LocalDiscoveryUIHandler::SendRegisterError() { |
| 493 web_ui()->CallJavascriptFunction("local_discovery.onRegistrationFailed"); | 495 web_ui()->CallJavascriptFunction("local_discovery.onRegistrationFailed"); |
| 494 } | 496 } |
| 495 | 497 |
| 496 void LocalDiscoveryUIHandler::SendRegisterDone( | 498 void LocalDiscoveryUIHandler::SendRegisterDone( |
| 497 const std::string& service_name) { | 499 const std::string& service_name) { |
| 498 // HACK(noamsml): Generate network traffic so the Windows firewall doesn't | 500 // HACK(noamsml): Generate network traffic so the Windows firewall doesn't |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 781 scoped_ptr<base::Value> null_value(base::Value::CreateNullValue()); | 783 scoped_ptr<base::Value> null_value(base::Value::CreateNullValue()); |
| 782 | 784 |
| 783 web_ui()->CallJavascriptFunction( | 785 web_ui()->CallJavascriptFunction( |
| 784 "local_discovery.onUnregisteredDeviceUpdate", service_key, *null_value); | 786 "local_discovery.onUnregisteredDeviceUpdate", service_key, *null_value); |
| 785 } | 787 } |
| 786 } | 788 } |
| 787 | 789 |
| 788 #endif // ENABLE_WIFI_BOOTSTRAPPING | 790 #endif // ENABLE_WIFI_BOOTSTRAPPING |
| 789 | 791 |
| 790 } // namespace local_discovery | 792 } // namespace local_discovery |
| OLD | NEW |