| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/tab_contents/tab_contents.h" | 5 #include "chrome/browser/tab_contents/tab_contents.h" |
| 6 | 6 |
| 7 #if defined(OS_CHROMEOS) | 7 #if defined(OS_CHROMEOS) |
| 8 // For GdkScreen | 8 // For GdkScreen |
| 9 #include <gdk/gdk.h> | 9 #include <gdk/gdk.h> |
| 10 #endif // defined(OS_CHROMEOS) | 10 #endif // defined(OS_CHROMEOS) |
| (...skipping 1422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1433 // NavigationController's last committed entry, not the active entry. For | 1433 // NavigationController's last committed entry, not the active entry. For |
| 1434 // example, if a page opens a popup in an onunload() handler, then the active | 1434 // example, if a page opens a popup in an onunload() handler, then the active |
| 1435 // entry is the page to be loaded as we navigate away from the unloading | 1435 // entry is the page to be loaded as we navigate away from the unloading |
| 1436 // page. For this reason, we can't use GetURL() to get the opener URL, | 1436 // page. For this reason, we can't use GetURL() to get the opener URL, |
| 1437 // because it returns the active entry. | 1437 // because it returns the active entry. |
| 1438 NavigationEntry* entry = controller_.GetLastCommittedEntry(); | 1438 NavigationEntry* entry = controller_.GetLastCommittedEntry(); |
| 1439 GURL creator = entry ? entry->virtual_url() : GURL::EmptyGURL(); | 1439 GURL creator = entry ? entry->virtual_url() : GURL::EmptyGURL(); |
| 1440 | 1440 |
| 1441 if (creator.is_valid() && | 1441 if (creator.is_valid() && |
| 1442 profile()->GetHostContentSettingsMap()->GetContentSetting( | 1442 profile()->GetHostContentSettingsMap()->GetContentSetting( |
| 1443 creator, CONTENT_SETTINGS_TYPE_POPUPS) == CONTENT_SETTING_ALLOW) { | 1443 creator, CONTENT_SETTINGS_TYPE_POPUPS, "") == CONTENT_SETTING_ALLOW) { |
| 1444 AddNewContents(new_contents, NEW_POPUP, initial_pos, true); | 1444 AddNewContents(new_contents, NEW_POPUP, initial_pos, true); |
| 1445 } else { | 1445 } else { |
| 1446 if (!blocked_popups_) | 1446 if (!blocked_popups_) |
| 1447 blocked_popups_ = new BlockedPopupContainer(this); | 1447 blocked_popups_ = new BlockedPopupContainer(this); |
| 1448 blocked_popups_->AddTabContents(new_contents, initial_pos); | 1448 blocked_popups_->AddTabContents(new_contents, initial_pos); |
| 1449 content_settings_delegate_->OnContentBlocked(CONTENT_SETTINGS_TYPE_POPUPS); | 1449 content_settings_delegate_->OnContentBlocked(CONTENT_SETTINGS_TYPE_POPUPS); |
| 1450 } | 1450 } |
| 1451 } | 1451 } |
| 1452 | 1452 |
| 1453 namespace { | 1453 namespace { |
| (...skipping 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3262 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); | 3262 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); |
| 3263 } | 3263 } |
| 3264 | 3264 |
| 3265 Profile* TabContents::GetProfileForPasswordManager() { | 3265 Profile* TabContents::GetProfileForPasswordManager() { |
| 3266 return profile(); | 3266 return profile(); |
| 3267 } | 3267 } |
| 3268 | 3268 |
| 3269 bool TabContents::DidLastPageLoadEncounterSSLErrors() { | 3269 bool TabContents::DidLastPageLoadEncounterSSLErrors() { |
| 3270 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); | 3270 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); |
| 3271 } | 3271 } |
| OLD | NEW |