Chromium Code Reviews| 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 1937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1948 DesktopNotificationServiceFactory::GetForProfile(profile); | 1948 DesktopNotificationServiceFactory::GetForProfile(profile); |
| 1949 service->CancelDesktopNotification( | 1949 service->CancelDesktopNotification( |
| 1950 render_process_id, render_view_id, notification_id); | 1950 render_process_id, render_view_id, notification_id); |
| 1951 #else | 1951 #else |
| 1952 NOTIMPLEMENTED(); | 1952 NOTIMPLEMENTED(); |
| 1953 #endif | 1953 #endif |
| 1954 } | 1954 } |
| 1955 | 1955 |
| 1956 bool ChromeContentBrowserClient::CanCreateWindow( | 1956 bool ChromeContentBrowserClient::CanCreateWindow( |
| 1957 const GURL& opener_url, | 1957 const GURL& opener_url, |
| 1958 const GURL& opener_top_level_frame_url, | |
| 1958 const GURL& source_origin, | 1959 const GURL& source_origin, |
| 1959 WindowContainerType container_type, | 1960 WindowContainerType container_type, |
| 1960 const GURL& target_url, | 1961 const GURL& target_url, |
| 1961 const content::Referrer& referrer, | 1962 const content::Referrer& referrer, |
| 1962 WindowOpenDisposition disposition, | 1963 WindowOpenDisposition disposition, |
| 1963 const WebWindowFeatures& features, | 1964 const WebWindowFeatures& features, |
| 1964 bool user_gesture, | 1965 bool user_gesture, |
| 1965 bool opener_suppressed, | 1966 bool opener_suppressed, |
| 1966 content::ResourceContext* context, | 1967 content::ResourceContext* context, |
| 1967 int render_process_id, | 1968 int render_process_id, |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2014 } | 2015 } |
| 2015 | 2016 |
| 2016 if (is_guest) | 2017 if (is_guest) |
| 2017 return true; | 2018 return true; |
| 2018 | 2019 |
| 2019 HostContentSettingsMap* content_settings = | 2020 HostContentSettingsMap* content_settings = |
| 2020 ProfileIOData::FromResourceContext(context)->GetHostContentSettingsMap(); | 2021 ProfileIOData::FromResourceContext(context)->GetHostContentSettingsMap(); |
| 2021 | 2022 |
| 2022 if (!user_gesture && !CommandLine::ForCurrentProcess()->HasSwitch( | 2023 if (!user_gesture && !CommandLine::ForCurrentProcess()->HasSwitch( |
| 2023 switches::kDisablePopupBlocking)) { | 2024 switches::kDisablePopupBlocking)) { |
| 2024 if (content_settings->GetContentSetting(opener_url, | 2025 if (content_settings->GetContentSetting(opener_top_level_frame_url, |
| 2025 opener_url, | 2026 opener_top_level_frame_url, |
|
Bernhard Bauer
2013/09/11 16:37:46
Should we pass the |opener_url| as one of the para
jochen (gone - plz use gerrit)
2013/09/11 16:45:25
We can consider that in a future cl. For now, I wa
| |
| 2026 CONTENT_SETTINGS_TYPE_POPUPS, | 2027 CONTENT_SETTINGS_TYPE_POPUPS, |
| 2027 std::string()) == | 2028 std::string()) == |
| 2028 CONTENT_SETTING_ALLOW) { | 2029 CONTENT_SETTING_ALLOW) { |
| 2029 return true; | 2030 return true; |
| 2030 } | 2031 } |
| 2031 | 2032 |
| 2032 BrowserThread::PostTask(BrowserThread::UI, | 2033 BrowserThread::PostTask(BrowserThread::UI, |
| 2033 FROM_HERE, | 2034 FROM_HERE, |
| 2034 base::Bind(&HandleBlockedPopupOnUIThread, | 2035 base::Bind(&HandleBlockedPopupOnUIThread, |
| 2035 BlockedPopupParams(target_url, | 2036 BlockedPopupParams(target_url, |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2541 #if defined(USE_NSS) | 2542 #if defined(USE_NSS) |
| 2542 crypto::CryptoModuleBlockingPasswordDelegate* | 2543 crypto::CryptoModuleBlockingPasswordDelegate* |
| 2543 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 2544 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
| 2544 const GURL& url) { | 2545 const GURL& url) { |
| 2545 return chrome::NewCryptoModuleBlockingDialogDelegate( | 2546 return chrome::NewCryptoModuleBlockingDialogDelegate( |
| 2546 chrome::kCryptoModulePasswordKeygen, url.host()); | 2547 chrome::kCryptoModulePasswordKeygen, url.host()); |
| 2547 } | 2548 } |
| 2548 #endif | 2549 #endif |
| 2549 | 2550 |
| 2550 } // namespace chrome | 2551 } // namespace chrome |
| OLD | NEW |