| 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 "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
| 8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
| 9 #include "chrome/browser/ui/browser_finder.h" | 9 #include "chrome/browser/ui/browser_finder.h" |
| 10 #include "chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.h" | 10 #include "chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.h" |
| 11 #include "chrome/browser/ui/webui/metrics_handler.h" | 11 #include "chrome/browser/ui/webui/metrics_handler.h" |
| 12 #include "chrome/common/pref_names.h" | 12 #include "chrome/common/pref_names.h" |
| 13 #include "chrome/common/url_constants.h" | 13 #include "chrome/common/url_constants.h" |
| 14 #include "chrome/grit/generated_resources.h" |
| 14 #include "content/public/browser/web_contents.h" | 15 #include "content/public/browser/web_contents.h" |
| 15 #include "content/public/browser/web_ui.h" | 16 #include "content/public/browser/web_ui.h" |
| 16 #include "content/public/browser/web_ui_data_source.h" | 17 #include "content/public/browser/web_ui_data_source.h" |
| 17 #include "grit/browser_resources.h" | 18 #include "grit/browser_resources.h" |
| 18 #include "grit/generated_resources.h" | |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 content::WebUIDataSource* CreateLocalDiscoveryHTMLSource() { | 22 content::WebUIDataSource* CreateLocalDiscoveryHTMLSource() { |
| 23 content::WebUIDataSource* source = | 23 content::WebUIDataSource* source = |
| 24 content::WebUIDataSource::Create(chrome::kChromeUIDevicesHost); | 24 content::WebUIDataSource::Create(chrome::kChromeUIDevicesHost); |
| 25 | 25 |
| 26 source->SetDefaultResource(IDR_LOCAL_DISCOVERY_HTML); | 26 source->SetDefaultResource(IDR_LOCAL_DISCOVERY_HTML); |
| 27 source->AddResourcePath("local_discovery.css", IDR_LOCAL_DISCOVERY_CSS); | 27 source->AddResourcePath("local_discovery.css", IDR_LOCAL_DISCOVERY_CSS); |
| 28 source->AddResourcePath("local_discovery.js", IDR_LOCAL_DISCOVERY_JS); | 28 source->AddResourcePath("local_discovery.js", IDR_LOCAL_DISCOVERY_JS); |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 user_prefs::PrefRegistrySyncable* registry) { | 141 user_prefs::PrefRegistrySyncable* registry) { |
| 142 registry->RegisterBooleanPref( | 142 registry->RegisterBooleanPref( |
| 143 prefs::kLocalDiscoveryNotificationsEnabled, | 143 prefs::kLocalDiscoveryNotificationsEnabled, |
| 144 #if defined(OS_WIN) | 144 #if defined(OS_WIN) |
| 145 false, | 145 false, |
| 146 #else | 146 #else |
| 147 true, | 147 true, |
| 148 #endif | 148 #endif |
| 149 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 149 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 150 } | 150 } |
| OLD | NEW |