| 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 <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 for (int i = 0; i < infobar_delegate_count(); ++i) { | 480 for (int i = 0; i < infobar_delegate_count(); ++i) { |
| 481 InfoBarDelegate* delegate = GetInfoBarDelegateAt(i); | 481 InfoBarDelegate* delegate = GetInfoBarDelegateAt(i); |
| 482 delegate->InfoBarClosed(); | 482 delegate->InfoBarClosed(); |
| 483 } | 483 } |
| 484 infobar_delegates_.clear(); | 484 infobar_delegates_.clear(); |
| 485 | 485 |
| 486 // TODO(brettw) this should be moved to the view. | 486 // TODO(brettw) this should be moved to the view. |
| 487 #if defined(OS_WIN) | 487 #if defined(OS_WIN) |
| 488 // If we still have a window handle, destroy it. GetNativeView can return | 488 // If we still have a window handle, destroy it. GetNativeView can return |
| 489 // NULL if this contents was part of a window that closed. | 489 // NULL if this contents was part of a window that closed. |
| 490 if (GetNativeView()) | 490 if (GetNativeView()) { |
| 491 RenderViewHost* host = render_view_host(); |
| 492 if (host && host->view()) { |
| 493 host->view()->WillWmDestroy(); |
| 494 } |
| 491 ::DestroyWindow(GetNativeView()); | 495 ::DestroyWindow(GetNativeView()); |
| 496 } |
| 492 #endif | 497 #endif |
| 493 | 498 |
| 494 // OnCloseStarted isn't called in unit tests. | 499 // OnCloseStarted isn't called in unit tests. |
| 495 if (!tab_close_start_time_.is_null()) { | 500 if (!tab_close_start_time_.is_null()) { |
| 496 UMA_HISTOGRAM_TIMES("Tab.Close", | 501 UMA_HISTOGRAM_TIMES("Tab.Close", |
| 497 base::TimeTicks::Now() - tab_close_start_time_); | 502 base::TimeTicks::Now() - tab_close_start_time_); |
| 498 } | 503 } |
| 499 } | 504 } |
| 500 | 505 |
| 501 // static | 506 // static |
| (...skipping 2831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3333 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); | 3338 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); |
| 3334 } | 3339 } |
| 3335 | 3340 |
| 3336 Profile* TabContents::GetProfileForPasswordManager() { | 3341 Profile* TabContents::GetProfileForPasswordManager() { |
| 3337 return profile(); | 3342 return profile(); |
| 3338 } | 3343 } |
| 3339 | 3344 |
| 3340 bool TabContents::DidLastPageLoadEncounterSSLErrors() { | 3345 bool TabContents::DidLastPageLoadEncounterSSLErrors() { |
| 3341 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); | 3346 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); |
| 3342 } | 3347 } |
| OLD | NEW |