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