| 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 <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 714 // safe to continue. | 714 // safe to continue. |
| 715 CHECK(can_be_default || !partition_domain->empty()); | 715 CHECK(can_be_default || !partition_domain->empty()); |
| 716 } | 716 } |
| 717 | 717 |
| 718 content::WebContentsViewDelegate* | 718 content::WebContentsViewDelegate* |
| 719 ChromeContentBrowserClient::GetWebContentsViewDelegate( | 719 ChromeContentBrowserClient::GetWebContentsViewDelegate( |
| 720 content::WebContents* web_contents) { | 720 content::WebContents* web_contents) { |
| 721 return chrome::CreateWebContentsViewDelegate(web_contents); | 721 return chrome::CreateWebContentsViewDelegate(web_contents); |
| 722 } | 722 } |
| 723 | 723 |
| 724 // Check if the extension activity log is enabled for the profile. | |
| 725 static bool IsExtensionActivityLogEnabledForProfile(Profile* profile) { | |
| 726 // crbug.com/247908 - This should be IsLogEnabled except for an issue | |
| 727 // in chrome_frame_net_tests | |
| 728 return extensions::ActivityLog::IsLogEnabledOnAnyProfile(); | |
| 729 } | |
| 730 | |
| 731 void ChromeContentBrowserClient::GuestWebContentsCreated( | 724 void ChromeContentBrowserClient::GuestWebContentsCreated( |
| 732 WebContents* guest_web_contents, | 725 WebContents* guest_web_contents, |
| 733 WebContents* opener_web_contents, | 726 WebContents* opener_web_contents, |
| 734 content::BrowserPluginGuestDelegate** guest_delegate, | 727 content::BrowserPluginGuestDelegate** guest_delegate, |
| 735 scoped_ptr<base::DictionaryValue> extra_params) { | 728 scoped_ptr<base::DictionaryValue> extra_params) { |
| 736 if (opener_web_contents) { | 729 if (opener_web_contents) { |
| 737 GuestView* guest = GuestView::FromWebContents(opener_web_contents); | 730 GuestView* guest = GuestView::FromWebContents(opener_web_contents); |
| 738 if (!guest) { | 731 if (!guest) { |
| 739 NOTREACHED(); | 732 NOTREACHED(); |
| 740 return; | 733 return; |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 840 host->GetChannel()->AddFilter(new NaClHostMessageFilter( | 833 host->GetChannel()->AddFilter(new NaClHostMessageFilter( |
| 841 id, profile->IsOffTheRecord(), | 834 id, profile->IsOffTheRecord(), |
| 842 profile->GetPath(), extension_info_map, | 835 profile->GetPath(), extension_info_map, |
| 843 context)); | 836 context)); |
| 844 #endif | 837 #endif |
| 845 | 838 |
| 846 host->Send(new ChromeViewMsg_SetIsIncognitoProcess( | 839 host->Send(new ChromeViewMsg_SetIsIncognitoProcess( |
| 847 profile->IsOffTheRecord())); | 840 profile->IsOffTheRecord())); |
| 848 | 841 |
| 849 host->Send(new ChromeViewMsg_SetExtensionActivityLogEnabled( | 842 host->Send(new ChromeViewMsg_SetExtensionActivityLogEnabled( |
| 850 IsExtensionActivityLogEnabledForProfile(profile))); | 843 extensions::ActivityLog::GetInstance(profile)->IsLogEnabled())); |
| 851 | 844 |
| 852 SendExtensionWebRequestStatusToHost(host); | 845 SendExtensionWebRequestStatusToHost(host); |
| 853 | 846 |
| 854 RendererContentSettingRules rules; | 847 RendererContentSettingRules rules; |
| 855 GetRendererContentSettingRules(profile->GetHostContentSettingsMap(), &rules); | 848 GetRendererContentSettingRules(profile->GetHostContentSettingsMap(), &rules); |
| 856 host->Send(new ChromeViewMsg_SetContentSettingRules(rules)); | 849 host->Send(new ChromeViewMsg_SetContentSettingRules(rules)); |
| 857 } | 850 } |
| 858 | 851 |
| 859 GURL ChromeContentBrowserClient::GetPossiblyPrivilegedURL( | 852 GURL ChromeContentBrowserClient::GetPossiblyPrivilegedURL( |
| 860 content::BrowserContext* browser_context, | 853 content::BrowserContext* browser_context, |
| (...skipping 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2460 #if defined(USE_NSS) | 2453 #if defined(USE_NSS) |
| 2461 crypto::CryptoModuleBlockingPasswordDelegate* | 2454 crypto::CryptoModuleBlockingPasswordDelegate* |
| 2462 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 2455 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
| 2463 const GURL& url) { | 2456 const GURL& url) { |
| 2464 return chrome::NewCryptoModuleBlockingDialogDelegate( | 2457 return chrome::NewCryptoModuleBlockingDialogDelegate( |
| 2465 chrome::kCryptoModulePasswordKeygen, url.host()); | 2458 chrome::kCryptoModulePasswordKeygen, url.host()); |
| 2466 } | 2459 } |
| 2467 #endif | 2460 #endif |
| 2468 | 2461 |
| 2469 } // namespace chrome | 2462 } // namespace chrome |
| OLD | NEW |