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