| 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 #include "app/gfx/text_elider.h" | 7 #include "app/gfx/text_elider.h" |
| 8 #include "app/l10n_util.h" | 8 #include "app/l10n_util.h" |
| 9 #include "app/resource_bundle.h" | 9 #include "app/resource_bundle.h" |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1066 if (tab_contents && tab_contents->delegate()) | 1066 if (tab_contents && tab_contents->delegate()) |
| 1067 tab_contents->delegate()->OnStartDownload(download); | 1067 tab_contents->delegate()->OnStartDownload(download); |
| 1068 } | 1068 } |
| 1069 | 1069 |
| 1070 void TabContents::WillClose(ConstrainedWindow* window) { | 1070 void TabContents::WillClose(ConstrainedWindow* window) { |
| 1071 ConstrainedWindowList::iterator it = | 1071 ConstrainedWindowList::iterator it = |
| 1072 find(child_windows_.begin(), child_windows_.end(), window); | 1072 find(child_windows_.begin(), child_windows_.end(), window); |
| 1073 bool removed_topmost_window = it == child_windows_.begin(); | 1073 bool removed_topmost_window = it == child_windows_.begin(); |
| 1074 if (it != child_windows_.end()) | 1074 if (it != child_windows_.end()) |
| 1075 child_windows_.erase(it); | 1075 child_windows_.erase(it); |
| 1076 if (removed_topmost_window && child_windows_.size() > 0) { | 1076 if (child_windows_.size() > 0) { |
| 1077 child_windows_[0]->ShowConstrainedWindow(); | 1077 if (removed_topmost_window) { |
| 1078 child_windows_[0]->ShowConstrainedWindow(); |
| 1079 } |
| 1078 BlockTabContent(true); | 1080 BlockTabContent(true); |
| 1079 } else { | 1081 } else { |
| 1080 BlockTabContent(false); | 1082 BlockTabContent(false); |
| 1081 } | 1083 } |
| 1082 } | 1084 } |
| 1083 | 1085 |
| 1084 void TabContents::WillCloseBlockedPopupContainer( | 1086 void TabContents::WillCloseBlockedPopupContainer( |
| 1085 BlockedPopupContainer* container) { | 1087 BlockedPopupContainer* container) { |
| 1086 DCHECK(blocked_popups_ == container); | 1088 DCHECK(blocked_popups_ == container); |
| 1087 blocked_popups_ = NULL; | 1089 blocked_popups_ = NULL; |
| (...skipping 1784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2872 } | 2874 } |
| 2873 | 2875 |
| 2874 void TabContents::set_encoding(const std::string& encoding) { | 2876 void TabContents::set_encoding(const std::string& encoding) { |
| 2875 encoding_ = CharacterEncoding::GetCanonicalEncodingNameByAliasName(encoding); | 2877 encoding_ = CharacterEncoding::GetCanonicalEncodingNameByAliasName(encoding); |
| 2876 } | 2878 } |
| 2877 | 2879 |
| 2878 void TabContents::SetAppIcon(const SkBitmap& app_icon) { | 2880 void TabContents::SetAppIcon(const SkBitmap& app_icon) { |
| 2879 app_icon_ = app_icon; | 2881 app_icon_ = app_icon; |
| 2880 NotifyNavigationStateChanged(INVALIDATE_TITLE); | 2882 NotifyNavigationStateChanged(INVALIDATE_TITLE); |
| 2881 } | 2883 } |
| OLD | NEW |