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 1944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1955 DesktopNotificationServiceFactory::GetForProfile(profile); | 1955 DesktopNotificationServiceFactory::GetForProfile(profile); |
1956 service->CancelDesktopNotification( | 1956 service->CancelDesktopNotification( |
1957 render_process_id, render_view_id, notification_id); | 1957 render_process_id, render_view_id, notification_id); |
1958 #else | 1958 #else |
1959 NOTIMPLEMENTED(); | 1959 NOTIMPLEMENTED(); |
1960 #endif | 1960 #endif |
1961 } | 1961 } |
1962 | 1962 |
1963 bool ChromeContentBrowserClient::CanCreateWindow( | 1963 bool ChromeContentBrowserClient::CanCreateWindow( |
1964 const GURL& opener_url, | 1964 const GURL& opener_url, |
| 1965 const GURL& opener_top_level_frame_url, |
1965 const GURL& source_origin, | 1966 const GURL& source_origin, |
1966 WindowContainerType container_type, | 1967 WindowContainerType container_type, |
1967 const GURL& target_url, | 1968 const GURL& target_url, |
1968 const content::Referrer& referrer, | 1969 const content::Referrer& referrer, |
1969 WindowOpenDisposition disposition, | 1970 WindowOpenDisposition disposition, |
1970 const WebWindowFeatures& features, | 1971 const WebWindowFeatures& features, |
1971 bool user_gesture, | 1972 bool user_gesture, |
1972 bool opener_suppressed, | 1973 bool opener_suppressed, |
1973 content::ResourceContext* context, | 1974 content::ResourceContext* context, |
1974 int render_process_id, | 1975 int render_process_id, |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2023 | 2024 |
2024 // Exempt extension processes from popup blocking. | 2025 // Exempt extension processes from popup blocking. |
2025 if (map->process_map().Contains(render_process_id)) | 2026 if (map->process_map().Contains(render_process_id)) |
2026 return true; | 2027 return true; |
2027 | 2028 |
2028 HostContentSettingsMap* content_settings = | 2029 HostContentSettingsMap* content_settings = |
2029 ProfileIOData::FromResourceContext(context)->GetHostContentSettingsMap(); | 2030 ProfileIOData::FromResourceContext(context)->GetHostContentSettingsMap(); |
2030 | 2031 |
2031 if (!user_gesture && !CommandLine::ForCurrentProcess()->HasSwitch( | 2032 if (!user_gesture && !CommandLine::ForCurrentProcess()->HasSwitch( |
2032 switches::kDisablePopupBlocking)) { | 2033 switches::kDisablePopupBlocking)) { |
2033 if (content_settings->GetContentSetting(opener_url, | 2034 if (content_settings->GetContentSetting(opener_top_level_frame_url, |
2034 opener_url, | 2035 opener_top_level_frame_url, |
2035 CONTENT_SETTINGS_TYPE_POPUPS, | 2036 CONTENT_SETTINGS_TYPE_POPUPS, |
2036 std::string()) == | 2037 std::string()) == |
2037 CONTENT_SETTING_ALLOW) { | 2038 CONTENT_SETTING_ALLOW) { |
2038 return true; | 2039 return true; |
2039 } | 2040 } |
2040 | 2041 |
2041 BrowserThread::PostTask(BrowserThread::UI, | 2042 BrowserThread::PostTask(BrowserThread::UI, |
2042 FROM_HERE, | 2043 FROM_HERE, |
2043 base::Bind(&HandleBlockedPopupOnUIThread, | 2044 base::Bind(&HandleBlockedPopupOnUIThread, |
2044 BlockedPopupParams(target_url, | 2045 BlockedPopupParams(target_url, |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2558 #if defined(USE_NSS) | 2559 #if defined(USE_NSS) |
2559 crypto::CryptoModuleBlockingPasswordDelegate* | 2560 crypto::CryptoModuleBlockingPasswordDelegate* |
2560 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 2561 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
2561 const GURL& url) { | 2562 const GURL& url) { |
2562 return chrome::NewCryptoModuleBlockingDialogDelegate( | 2563 return chrome::NewCryptoModuleBlockingDialogDelegate( |
2563 chrome::kCryptoModulePasswordKeygen, url.host()); | 2564 chrome::kCryptoModulePasswordKeygen, url.host()); |
2564 } | 2565 } |
2565 #endif | 2566 #endif |
2566 | 2567 |
2567 } // namespace chrome | 2568 } // namespace chrome |
OLD | NEW |