| 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 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1257 | 1257 |
| 1258 // Clear out any child windows since we are leaving this page entirely. | 1258 // Clear out any child windows since we are leaving this page entirely. |
| 1259 // We use indices instead of iterators in case CloseWindow does something | 1259 // We use indices instead of iterators in case CloseWindow does something |
| 1260 // that may invalidate an iterator. | 1260 // that may invalidate an iterator. |
| 1261 int size = static_cast<int>(child_windows_.size()); | 1261 int size = static_cast<int>(child_windows_.size()); |
| 1262 for (int i = size - 1; i >= 0; --i) { | 1262 for (int i = size - 1; i >= 0; --i) { |
| 1263 ConstrainedWindow* window = child_windows_[i]; | 1263 ConstrainedWindow* window = child_windows_[i]; |
| 1264 if (window) | 1264 if (window) |
| 1265 window->CloseConstrainedWindow(); | 1265 window->CloseConstrainedWindow(); |
| 1266 } | 1266 } |
| 1267 |
| 1268 // Close the popup container. |
| 1269 if (blocked_popups_) { |
| 1270 blocked_popups_->Destroy(); |
| 1271 blocked_popups_ = NULL; |
| 1272 } |
| 1267 } | 1273 } |
| 1268 | 1274 |
| 1269 void TabContents::UpdateStarredStateForCurrentURL() { | 1275 void TabContents::UpdateStarredStateForCurrentURL() { |
| 1270 BookmarkModel* model = profile()->GetBookmarkModel(); | 1276 BookmarkModel* model = profile()->GetBookmarkModel(); |
| 1271 const bool old_state = is_starred_; | 1277 const bool old_state = is_starred_; |
| 1272 is_starred_ = (model && model->IsBookmarked(GetURL())); | 1278 is_starred_ = (model && model->IsBookmarked(GetURL())); |
| 1273 | 1279 |
| 1274 if (is_starred_ != old_state && delegate()) | 1280 if (is_starred_ != old_state && delegate()) |
| 1275 delegate()->URLStarredChanged(this, is_starred_); | 1281 delegate()->URLStarredChanged(this, is_starred_); |
| 1276 } | 1282 } |
| (...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2361 NavigationController::LoadCommittedDetails& committed_details = | 2367 NavigationController::LoadCommittedDetails& committed_details = |
| 2362 *(Details<NavigationController::LoadCommittedDetails>(details).ptr()); | 2368 *(Details<NavigationController::LoadCommittedDetails>(details).ptr()); |
| 2363 ExpireInfoBars(committed_details); | 2369 ExpireInfoBars(committed_details); |
| 2364 break; | 2370 break; |
| 2365 } | 2371 } |
| 2366 | 2372 |
| 2367 default: | 2373 default: |
| 2368 NOTREACHED(); | 2374 NOTREACHED(); |
| 2369 } | 2375 } |
| 2370 } | 2376 } |
| OLD | NEW |