Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/ui/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <shellapi.h> | 9 #include <shellapi.h> |
| 10 #endif // defined(OS_WIN) | 10 #endif // defined(OS_WIN) |
| (...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 686 return; | 686 return; |
| 687 } | 687 } |
| 688 | 688 |
| 689 // Sets the confirmation state to NOT_PROMPTED so that if the user tries to | 689 // Sets the confirmation state to NOT_PROMPTED so that if the user tries to |
| 690 // close again we'll show the warning again. | 690 // close again we'll show the warning again. |
| 691 cancel_download_confirmation_state_ = NOT_PROMPTED; | 691 cancel_download_confirmation_state_ = NOT_PROMPTED; |
| 692 | 692 |
| 693 // Show the download page so the user can figure-out what downloads are still | 693 // Show the download page so the user can figure-out what downloads are still |
| 694 // in-progress. | 694 // in-progress. |
| 695 chrome::ShowDownloads(this); | 695 chrome::ShowDownloads(this); |
| 696 unload_controller_->CancelWindowClose(); | |
|
Sam McNally
2014/02/16 23:54:29
if (IsFastTabUnloadEnabled())
fast_unload_cont
benjhayden
2014/02/18 18:08:25
Done.
| |
| 696 } | 697 } |
| 697 | 698 |
| 698 Browser::DownloadClosePreventionType Browser::OkToCloseWithInProgressDownloads( | 699 Browser::DownloadClosePreventionType Browser::OkToCloseWithInProgressDownloads( |
| 699 int* num_downloads_blocking) const { | 700 int* num_downloads_blocking) const { |
| 700 DCHECK(num_downloads_blocking); | 701 DCHECK(num_downloads_blocking); |
| 701 *num_downloads_blocking = 0; | 702 *num_downloads_blocking = 0; |
| 702 | 703 |
| 703 // If we're not running a full browser process with a profile manager | 704 // If we're not running a full browser process with a profile manager |
| 704 // (testing), it's ok to close the browser. | 705 // (testing), it's ok to close the browser. |
| 705 if (!g_browser_process->profile_manager()) | 706 if (!g_browser_process->profile_manager()) |
| (...skipping 1586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2292 if (contents && !allow_js_access) { | 2293 if (contents && !allow_js_access) { |
| 2293 contents->web_contents()->GetController().LoadURL( | 2294 contents->web_contents()->GetController().LoadURL( |
| 2294 target_url, | 2295 target_url, |
| 2295 content::Referrer(), | 2296 content::Referrer(), |
| 2296 content::PAGE_TRANSITION_LINK, | 2297 content::PAGE_TRANSITION_LINK, |
| 2297 std::string()); // No extra headers. | 2298 std::string()); // No extra headers. |
| 2298 } | 2299 } |
| 2299 | 2300 |
| 2300 return contents != NULL; | 2301 return contents != NULL; |
| 2301 } | 2302 } |
| OLD | NEW |