| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 9 #include "base/file_version_info.h" | 9 #include "base/file_version_info.h" |
| 10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
| (...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 825 if (initial_pos.width() > max_width || | 825 if (initial_pos.width() > max_width || |
| 826 initial_pos.height() > max_height) { | 826 initial_pos.height() > max_height) { |
| 827 disposition = NEW_FOREGROUND_TAB; | 827 disposition = NEW_FOREGROUND_TAB; |
| 828 } | 828 } |
| 829 } | 829 } |
| 830 #endif | 830 #endif |
| 831 | 831 |
| 832 new_contents->DisassociateFromPopupCount(); | 832 new_contents->DisassociateFromPopupCount(); |
| 833 delegate_->AddNewContents(this, new_contents, disposition, initial_pos, | 833 delegate_->AddNewContents(this, new_contents, disposition, initial_pos, |
| 834 user_gesture); | 834 user_gesture); |
| 835 NotificationService::current()->Notify( |
| 836 NotificationType::TAB_ADDED, |
| 837 Source<TabContentsDelegate>(delegate_), |
| 838 Details<TabContents>(this)); |
| 835 } | 839 } |
| 836 PopupNotificationVisibilityChanged(ShowingBlockedPopupNotification()); | 840 PopupNotificationVisibilityChanged(ShowingBlockedPopupNotification()); |
| 837 } | 841 } |
| 838 | 842 |
| 839 void TabContents::CloseAllSuppressedPopups() { | 843 void TabContents::CloseAllSuppressedPopups() { |
| 840 if (blocked_popups_) | 844 if (blocked_popups_) |
| 841 blocked_popups_->CloseAll(); | 845 blocked_popups_->CloseAll(); |
| 842 } | 846 } |
| 843 | 847 |
| 844 void TabContents::PopupNotificationVisibilityChanged(bool visible) { | 848 void TabContents::PopupNotificationVisibilityChanged(bool visible) { |
| (...skipping 1663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2508 | 2512 |
| 2509 default: | 2513 default: |
| 2510 NOTREACHED(); | 2514 NOTREACHED(); |
| 2511 } | 2515 } |
| 2512 } | 2516 } |
| 2513 | 2517 |
| 2514 void TabContents::set_encoding(const std::string& encoding) { | 2518 void TabContents::set_encoding(const std::string& encoding) { |
| 2515 encoding_ = CharacterEncoding::GetCanonicalEncodingNameByAliasName(encoding); | 2519 encoding_ = CharacterEncoding::GetCanonicalEncodingNameByAliasName(encoding); |
| 2516 } | 2520 } |
| 2517 | 2521 |
| OLD | NEW |