| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 1324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1335 web_prefs.default_encoding = prefs->GetString(prefs::kGlobalDefaultCharset); | 1335 web_prefs.default_encoding = prefs->GetString(prefs::kGlobalDefaultCharset); |
| 1336 } | 1336 } |
| 1337 DCHECK(!web_prefs.default_encoding.empty()); | 1337 DCHECK(!web_prefs.default_encoding.empty()); |
| 1338 | 1338 |
| 1339 if (ChildProcessSecurityPolicy::GetInstance()->HasWebUIBindings( | 1339 if (ChildProcessSecurityPolicy::GetInstance()->HasWebUIBindings( |
| 1340 rvh->process()->GetID())) { | 1340 rvh->process()->GetID())) { |
| 1341 web_prefs.loads_images_automatically = true; | 1341 web_prefs.loads_images_automatically = true; |
| 1342 web_prefs.javascript_enabled = true; | 1342 web_prefs.javascript_enabled = true; |
| 1343 } | 1343 } |
| 1344 | 1344 |
| 1345 web_prefs.is_online = !net::NetworkChangeNotifier::IsOffline(); | 1345 web_prefs.is_online = net::NetworkChangeNotifier::GetConnectionState() != |
| 1346 net::NetworkChangeNotifier::NONE; |
| 1346 | 1347 |
| 1347 ExtensionService* service = profile->GetExtensionService(); | 1348 ExtensionService* service = profile->GetExtensionService(); |
| 1348 if (service) { | 1349 if (service) { |
| 1349 const Extension* extension = service->extensions()->GetByID( | 1350 const Extension* extension = service->extensions()->GetByID( |
| 1350 rvh->site_instance()->site().host()); | 1351 rvh->site_instance()->site().host()); |
| 1351 extension_webkit_preferences::SetPreferences( | 1352 extension_webkit_preferences::SetPreferences( |
| 1352 extension, rvh->delegate()->GetRenderViewType(), &web_prefs); | 1353 extension, rvh->delegate()->GetRenderViewType(), &web_prefs); |
| 1353 } | 1354 } |
| 1354 | 1355 |
| 1355 if (rvh->delegate()->GetRenderViewType() == chrome::VIEW_TYPE_NOTIFICATION) { | 1356 if (rvh->delegate()->GetRenderViewType() == chrome::VIEW_TYPE_NOTIFICATION) { |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1472 #if defined(USE_NSS) | 1473 #if defined(USE_NSS) |
| 1473 crypto::CryptoModuleBlockingPasswordDelegate* | 1474 crypto::CryptoModuleBlockingPasswordDelegate* |
| 1474 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 1475 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
| 1475 const GURL& url) { | 1476 const GURL& url) { |
| 1476 return browser::NewCryptoModuleBlockingDialogDelegate( | 1477 return browser::NewCryptoModuleBlockingDialogDelegate( |
| 1477 browser::kCryptoModulePasswordKeygen, url.host()); | 1478 browser::kCryptoModulePasswordKeygen, url.host()); |
| 1478 } | 1479 } |
| 1479 #endif | 1480 #endif |
| 1480 | 1481 |
| 1481 } // namespace chrome | 1482 } // namespace chrome |
| OLD | NEW |