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 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "chrome/browser/ui/browser_finder.h" | 27 #include "chrome/browser/ui/browser_finder.h" |
28 #include "chrome/browser/ui/browser_tabstrip.h" | 28 #include "chrome/browser/ui/browser_tabstrip.h" |
29 #include "chrome/browser/ui/chrome_pages.h" | 29 #include "chrome/browser/ui/chrome_pages.h" |
30 #include "chrome/common/pref_names.h" | 30 #include "chrome/common/pref_names.h" |
31 #include "chrome/grit/generated_resources.h" | 31 #include "chrome/grit/generated_resources.h" |
32 #include "components/cloud_devices/common/cloud_devices_urls.h" | 32 #include "components/cloud_devices/common/cloud_devices_urls.h" |
33 #include "components/prefs/pref_service.h" | 33 #include "components/prefs/pref_service.h" |
34 #include "components/signin/core/browser/profile_oauth2_token_service.h" | 34 #include "components/signin/core/browser/profile_oauth2_token_service.h" |
35 #include "content/public/browser/user_metrics.h" | 35 #include "content/public/browser/user_metrics.h" |
36 #include "content/public/browser/web_ui.h" | 36 #include "content/public/browser/web_ui.h" |
| 37 #include "printing/features/features.h" |
37 #include "ui/base/l10n/l10n_util.h" | 38 #include "ui/base/l10n/l10n_util.h" |
38 | 39 |
39 #if defined(ENABLE_PRINT_PREVIEW) && !defined(OS_CHROMEOS) | 40 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) && !defined(OS_CHROMEOS) |
40 #define CLOUD_PRINT_CONNECTOR_UI_AVAILABLE | 41 #define CLOUD_PRINT_CONNECTOR_UI_AVAILABLE |
41 #endif | 42 #endif |
42 | 43 |
43 using cloud_print::CloudPrintPrinterList; | 44 using cloud_print::CloudPrintPrinterList; |
44 using cloud_print::DeviceDescription; | 45 using cloud_print::DeviceDescription; |
45 using cloud_print::GCDApiFlow; | 46 using cloud_print::GCDApiFlow; |
46 using cloud_print::PrivetRegisterOperation; | 47 using cloud_print::PrivetRegisterOperation; |
47 | 48 |
48 namespace local_discovery { | 49 namespace local_discovery { |
49 | 50 |
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 service->RefreshStatusFromService(); | 613 service->RefreshStatusFromService(); |
613 } | 614 } |
614 | 615 |
615 CloudPrintProxyService* LocalDiscoveryUIHandler::GetCloudPrintProxyService() { | 616 CloudPrintProxyService* LocalDiscoveryUIHandler::GetCloudPrintProxyService() { |
616 return CloudPrintProxyServiceFactory::GetForProfile( | 617 return CloudPrintProxyServiceFactory::GetForProfile( |
617 Profile::FromWebUI(web_ui())); | 618 Profile::FromWebUI(web_ui())); |
618 } | 619 } |
619 #endif // defined(CLOUD_PRINT_CONNECTOR_UI_AVAILABLE) | 620 #endif // defined(CLOUD_PRINT_CONNECTOR_UI_AVAILABLE) |
620 | 621 |
621 } // namespace local_discovery | 622 } // namespace local_discovery |
OLD | NEW |