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.h" | 5 #include "chrome/browser/ui/webui/local_discovery/local_discovery_ui.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
10 #include "chrome/browser/ui/browser_finder.h" | 10 #include "chrome/browser/ui/browser_finder.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 content::WebUIDataSource* CreateLocalDiscoveryHTMLSource() { | 25 content::WebUIDataSource* CreateLocalDiscoveryHTMLSource() { |
26 content::WebUIDataSource* source = | 26 content::WebUIDataSource* source = |
27 content::WebUIDataSource::Create(chrome::kChromeUIDevicesHost); | 27 content::WebUIDataSource::Create(chrome::kChromeUIDevicesHost); |
28 | 28 |
29 source->SetDefaultResource(IDR_LOCAL_DISCOVERY_HTML); | 29 source->SetDefaultResource(IDR_LOCAL_DISCOVERY_HTML); |
30 source->AddResourcePath("local_discovery.css", IDR_LOCAL_DISCOVERY_CSS); | 30 source->AddResourcePath("local_discovery.css", IDR_LOCAL_DISCOVERY_CSS); |
31 source->AddResourcePath("local_discovery.js", IDR_LOCAL_DISCOVERY_JS); | 31 source->AddResourcePath("local_discovery.js", IDR_LOCAL_DISCOVERY_JS); |
32 source->AddResourcePath("device.png", IDR_LOCAL_DISCOVERY_DEVICE_PNG); | |
33 source->AddResourcePath("printer.png", IDR_LOCAL_DISCOVERY_PRINTER_PNG); | |
34 | 32 |
35 source->AddLocalizedString("serviceRegister", | 33 source->AddLocalizedString("serviceRegister", |
36 IDS_LOCAL_DISCOVERY_SERVICE_REGISTER); | 34 IDS_LOCAL_DISCOVERY_SERVICE_REGISTER); |
37 source->AddLocalizedString("manageDevice", IDS_LOCAL_DISCOVERY_MANAGE_DEVICE); | 35 source->AddLocalizedString("manageDevice", IDS_LOCAL_DISCOVERY_MANAGE_DEVICE); |
38 | 36 |
39 source->AddLocalizedString("registerPrinterConfirmMessage", | 37 source->AddLocalizedString("registerPrinterConfirmMessage", |
40 IDS_LOCAL_DISCOVERY_REGISTER_PRINTER_CONFIRMATION); | 38 IDS_LOCAL_DISCOVERY_REGISTER_PRINTER_CONFIRMATION); |
41 source->AddLocalizedString("registerDeviceConfirmMessage", | 39 source->AddLocalizedString("registerDeviceConfirmMessage", |
42 IDS_LOCAL_DISCOVERY_REGISTER_DEVICE_CONFIRMATION); | 40 IDS_LOCAL_DISCOVERY_REGISTER_DEVICE_CONFIRMATION); |
43 source->AddLocalizedString("registerUser", | 41 source->AddLocalizedString("registerUser", |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 user_prefs::PrefRegistrySyncable* registry) { | 141 user_prefs::PrefRegistrySyncable* registry) { |
144 registry->RegisterBooleanPref( | 142 registry->RegisterBooleanPref( |
145 prefs::kLocalDiscoveryNotificationsEnabled, | 143 prefs::kLocalDiscoveryNotificationsEnabled, |
146 #if defined(OS_WIN) | 144 #if defined(OS_WIN) |
147 false, | 145 false, |
148 #else | 146 #else |
149 true, | 147 true, |
150 #endif | 148 #endif |
151 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 149 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
152 } | 150 } |
OLD | NEW |