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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 chrome::AddSelectedTabWithURL(browser, | 254 chrome::AddSelectedTabWithURL(browser, |
255 cloud_devices::GetCloudPrintManageDeviceURL(id), | 255 cloud_devices::GetCloudPrintManageDeviceURL(id), |
256 ui::PAGE_TRANSITION_FROM_API); | 256 ui::PAGE_TRANSITION_FROM_API); |
257 } | 257 } |
258 | 258 |
259 void LocalDiscoveryUIHandler::HandleShowSyncUI( | 259 void LocalDiscoveryUIHandler::HandleShowSyncUI( |
260 const base::ListValue* args) { | 260 const base::ListValue* args) { |
261 Browser* browser = chrome::FindBrowserWithWebContents( | 261 Browser* browser = chrome::FindBrowserWithWebContents( |
262 web_ui()->GetWebContents()); | 262 web_ui()->GetWebContents()); |
263 DCHECK(browser); | 263 DCHECK(browser); |
264 chrome::ShowBrowserSignin(browser, signin_metrics::SOURCE_DEVICES_PAGE); | 264 chrome::ShowBrowserSignin( |
| 265 browser, signin_metrics::AccessPoint::ACCESS_POINT_DEVICES_PAGE); |
265 } | 266 } |
266 | 267 |
267 void LocalDiscoveryUIHandler::StartRegisterHTTP( | 268 void LocalDiscoveryUIHandler::StartRegisterHTTP( |
268 scoped_ptr<PrivetHTTPClient> http_client) { | 269 scoped_ptr<PrivetHTTPClient> http_client) { |
269 current_http_client_ = PrivetV1HTTPClient::CreateDefault(http_client.Pass()); | 270 current_http_client_ = PrivetV1HTTPClient::CreateDefault(http_client.Pass()); |
270 | 271 |
271 std::string user = GetSyncAccount(); | 272 std::string user = GetSyncAccount(); |
272 | 273 |
273 if (!current_http_client_) { | 274 if (!current_http_client_) { |
274 SendRegisterError(); | 275 SendRegisterError(); |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 | 641 |
641 void LocalDiscoveryUIHandler::RefreshCloudPrintStatusFromService() { | 642 void LocalDiscoveryUIHandler::RefreshCloudPrintStatusFromService() { |
642 if (cloud_print_connector_ui_enabled_) | 643 if (cloud_print_connector_ui_enabled_) |
643 CloudPrintProxyServiceFactory::GetForProfile(Profile::FromWebUI(web_ui()))-> | 644 CloudPrintProxyServiceFactory::GetForProfile(Profile::FromWebUI(web_ui()))-> |
644 RefreshStatusFromService(); | 645 RefreshStatusFromService(); |
645 } | 646 } |
646 | 647 |
647 #endif // cloud print connector option stuff | 648 #endif // cloud print connector option stuff |
648 | 649 |
649 } // namespace local_discovery | 650 } // namespace local_discovery |
OLD | NEW |