| 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 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1015 ViewMsg_ExecuteCode_Params(request_id, extension_id, host_permissions, | 1015 ViewMsg_ExecuteCode_Params(request_id, extension_id, host_permissions, |
| 1016 is_js_code, code_string, all_frames))); | 1016 is_js_code, code_string, all_frames))); |
| 1017 } | 1017 } |
| 1018 | 1018 |
| 1019 void TabContents::PopupNotificationVisibilityChanged(bool visible) { | 1019 void TabContents::PopupNotificationVisibilityChanged(bool visible) { |
| 1020 if (is_being_destroyed_) | 1020 if (is_being_destroyed_) |
| 1021 return; | 1021 return; |
| 1022 content_settings_delegate_->SetPopupsBlocked(visible); | 1022 content_settings_delegate_->SetPopupsBlocked(visible); |
| 1023 if (!dont_notify_render_view_) | 1023 if (!dont_notify_render_view_) |
| 1024 render_view_host()->AllowScriptToClose(!visible); | 1024 render_view_host()->AllowScriptToClose(!visible); |
| 1025 if (visible) | |
| 1026 PopupBlockedAnimation::Show(this); | |
| 1027 } | 1025 } |
| 1028 | 1026 |
| 1029 gfx::NativeView TabContents::GetContentNativeView() const { | 1027 gfx::NativeView TabContents::GetContentNativeView() const { |
| 1030 return view_->GetContentNativeView(); | 1028 return view_->GetContentNativeView(); |
| 1031 } | 1029 } |
| 1032 | 1030 |
| 1033 gfx::NativeView TabContents::GetNativeView() const { | 1031 gfx::NativeView TabContents::GetNativeView() const { |
| 1034 return view_->GetNativeView(); | 1032 return view_->GetNativeView(); |
| 1035 } | 1033 } |
| 1036 | 1034 |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1519 if (creator.is_valid() && | 1517 if (creator.is_valid() && |
| 1520 profile()->GetHostContentSettingsMap()->GetContentSetting( | 1518 profile()->GetHostContentSettingsMap()->GetContentSetting( |
| 1521 creator, CONTENT_SETTINGS_TYPE_POPUPS, "") == CONTENT_SETTING_ALLOW) { | 1519 creator, CONTENT_SETTINGS_TYPE_POPUPS, "") == CONTENT_SETTING_ALLOW) { |
| 1522 AddNewContents(new_contents, NEW_POPUP, initial_pos, true); | 1520 AddNewContents(new_contents, NEW_POPUP, initial_pos, true); |
| 1523 } else { | 1521 } else { |
| 1524 if (!blocked_popups_) | 1522 if (!blocked_popups_) |
| 1525 blocked_popups_ = new BlockedPopupContainer(this); | 1523 blocked_popups_ = new BlockedPopupContainer(this); |
| 1526 blocked_popups_->AddTabContents(new_contents, initial_pos); | 1524 blocked_popups_->AddTabContents(new_contents, initial_pos); |
| 1527 content_settings_delegate_->OnContentBlocked(CONTENT_SETTINGS_TYPE_POPUPS, | 1525 content_settings_delegate_->OnContentBlocked(CONTENT_SETTINGS_TYPE_POPUPS, |
| 1528 std::string()); | 1526 std::string()); |
| 1527 if (!is_being_destroyed()) |
| 1528 PopupBlockedAnimation::Show(this); |
| 1529 } | 1529 } |
| 1530 } | 1530 } |
| 1531 | 1531 |
| 1532 namespace { | 1532 namespace { |
| 1533 bool TransitionIsReload(PageTransition::Type transition) { | 1533 bool TransitionIsReload(PageTransition::Type transition) { |
| 1534 return PageTransition::StripQualifier(transition) == PageTransition::RELOAD; | 1534 return PageTransition::StripQualifier(transition) == PageTransition::RELOAD; |
| 1535 } | 1535 } |
| 1536 } | 1536 } |
| 1537 | 1537 |
| 1538 void TabContents::ExpireInfoBars( | 1538 void TabContents::ExpireInfoBars( |
| (...skipping 1702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3241 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); | 3241 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); |
| 3242 } | 3242 } |
| 3243 | 3243 |
| 3244 Profile* TabContents::GetProfileForPasswordManager() { | 3244 Profile* TabContents::GetProfileForPasswordManager() { |
| 3245 return profile(); | 3245 return profile(); |
| 3246 } | 3246 } |
| 3247 | 3247 |
| 3248 bool TabContents::DidLastPageLoadEncounterSSLErrors() { | 3248 bool TabContents::DidLastPageLoadEncounterSSLErrors() { |
| 3249 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); | 3249 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); |
| 3250 } | 3250 } |
| OLD | NEW |