| 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 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 // safe to continue. | 784 // safe to continue. |
| 785 CHECK(can_be_default || !partition_domain->empty()); | 785 CHECK(can_be_default || !partition_domain->empty()); |
| 786 } | 786 } |
| 787 | 787 |
| 788 content::WebContentsViewDelegate* | 788 content::WebContentsViewDelegate* |
| 789 ChromeContentBrowserClient::GetWebContentsViewDelegate( | 789 ChromeContentBrowserClient::GetWebContentsViewDelegate( |
| 790 content::WebContents* web_contents) { | 790 content::WebContents* web_contents) { |
| 791 return chrome::CreateWebContentsViewDelegate(web_contents); | 791 return chrome::CreateWebContentsViewDelegate(web_contents); |
| 792 } | 792 } |
| 793 | 793 |
| 794 // Check if the extension activity log is enabled for the profile. | |
| 795 static bool IsExtensionActivityLogEnabledForProfile(Profile* profile) { | |
| 796 // crbug.com/247908 - This should be IsLogEnabled except for an issue | |
| 797 // in chrome_frame_net_tests | |
| 798 return extensions::ActivityLog::IsLogEnabledOnAnyProfile(); | |
| 799 } | |
| 800 | |
| 801 void ChromeContentBrowserClient::GuestWebContentsCreated( | 794 void ChromeContentBrowserClient::GuestWebContentsCreated( |
| 802 WebContents* guest_web_contents, | 795 WebContents* guest_web_contents, |
| 803 WebContents* opener_web_contents, | 796 WebContents* opener_web_contents, |
| 804 content::BrowserPluginGuestDelegate** guest_delegate, | 797 content::BrowserPluginGuestDelegate** guest_delegate, |
| 805 scoped_ptr<base::DictionaryValue> extra_params) { | 798 scoped_ptr<base::DictionaryValue> extra_params) { |
| 806 if (opener_web_contents) { | 799 if (opener_web_contents) { |
| 807 GuestView* guest = GuestView::FromWebContents(opener_web_contents); | 800 GuestView* guest = GuestView::FromWebContents(opener_web_contents); |
| 808 if (!guest) { | 801 if (!guest) { |
| 809 NOTREACHED(); | 802 NOTREACHED(); |
| 810 return; | 803 return; |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 913 host->GetChannel()->AddFilter(new NaClHostMessageFilter( | 906 host->GetChannel()->AddFilter(new NaClHostMessageFilter( |
| 914 id, profile->IsOffTheRecord(), | 907 id, profile->IsOffTheRecord(), |
| 915 profile->GetPath(), extension_info_map, | 908 profile->GetPath(), extension_info_map, |
| 916 context)); | 909 context)); |
| 917 #endif | 910 #endif |
| 918 | 911 |
| 919 host->Send(new ChromeViewMsg_SetIsIncognitoProcess( | 912 host->Send(new ChromeViewMsg_SetIsIncognitoProcess( |
| 920 profile->IsOffTheRecord())); | 913 profile->IsOffTheRecord())); |
| 921 | 914 |
| 922 host->Send(new ChromeViewMsg_SetExtensionActivityLogEnabled( | 915 host->Send(new ChromeViewMsg_SetExtensionActivityLogEnabled( |
| 923 IsExtensionActivityLogEnabledForProfile(profile))); | 916 extensions::ActivityLog::GetInstance(profile)->IsLogEnabled())); |
| 924 | 917 |
| 925 SendExtensionWebRequestStatusToHost(host); | 918 SendExtensionWebRequestStatusToHost(host); |
| 926 | 919 |
| 927 RendererContentSettingRules rules; | 920 RendererContentSettingRules rules; |
| 928 GetRendererContentSettingRules(profile->GetHostContentSettingsMap(), &rules); | 921 GetRendererContentSettingRules(profile->GetHostContentSettingsMap(), &rules); |
| 929 host->Send(new ChromeViewMsg_SetContentSettingRules(rules)); | 922 host->Send(new ChromeViewMsg_SetContentSettingRules(rules)); |
| 930 } | 923 } |
| 931 | 924 |
| 932 GURL ChromeContentBrowserClient::GetEffectiveURL( | 925 GURL ChromeContentBrowserClient::GetEffectiveURL( |
| 933 content::BrowserContext* browser_context, const GURL& url) { | 926 content::BrowserContext* browser_context, const GURL& url) { |
| (...skipping 1619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2553 #if defined(USE_NSS) | 2546 #if defined(USE_NSS) |
| 2554 crypto::CryptoModuleBlockingPasswordDelegate* | 2547 crypto::CryptoModuleBlockingPasswordDelegate* |
| 2555 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 2548 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
| 2556 const GURL& url) { | 2549 const GURL& url) { |
| 2557 return chrome::NewCryptoModuleBlockingDialogDelegate( | 2550 return chrome::NewCryptoModuleBlockingDialogDelegate( |
| 2558 chrome::kCryptoModulePasswordKeygen, url.host()); | 2551 chrome::kCryptoModulePasswordKeygen, url.host()); |
| 2559 } | 2552 } |
| 2560 #endif | 2553 #endif |
| 2561 | 2554 |
| 2562 } // namespace chrome | 2555 } // namespace chrome |
| OLD | NEW |