Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 // OS_WIN | 10 #endif // OS_WIN |
| (...skipping 1403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1414 void Browser::RenderWidgetShowing() { | 1414 void Browser::RenderWidgetShowing() { |
| 1415 window_->DisableInactiveFrame(); | 1415 window_->DisableInactiveFrame(); |
| 1416 } | 1416 } |
| 1417 | 1417 |
| 1418 int Browser::GetExtraRenderViewHeight() const { | 1418 int Browser::GetExtraRenderViewHeight() const { |
| 1419 return window_->GetExtraRenderViewHeight(); | 1419 return window_->GetExtraRenderViewHeight(); |
| 1420 } | 1420 } |
| 1421 | 1421 |
| 1422 void Browser::OnStartDownload(WebContents* source, | 1422 void Browser::OnStartDownload(WebContents* source, |
| 1423 content::DownloadItem* download) { | 1423 content::DownloadItem* download) { |
| 1424 if (!download_util::GetShouldShowInShelf(download)) | |
| 1425 return; | |
|
Nico
2012/09/25 03:07:18
test
sail
2012/10/02 20:24:38
Done.
Added a DownloadTest.HiddenDownload test.
| |
| 1426 | |
| 1424 WebContents* constrained = GetConstrainingWebContents(source); | 1427 WebContents* constrained = GetConstrainingWebContents(source); |
| 1425 if (constrained != source) { | 1428 if (constrained != source) { |
| 1426 // Download in a constrained popup is shown in the tab that opened it. | 1429 // Download in a constrained popup is shown in the tab that opened it. |
| 1427 constrained->GetDelegate()->OnStartDownload(constrained, download); | 1430 constrained->GetDelegate()->OnStartDownload(constrained, download); |
| 1428 return; | 1431 return; |
| 1429 } | 1432 } |
| 1430 | 1433 |
| 1431 if (!window()) | 1434 if (!window()) |
| 1432 return; | 1435 return; |
| 1433 | 1436 |
| (...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2286 if (contents && !allow_js_access) { | 2289 if (contents && !allow_js_access) { |
| 2287 contents->web_contents()->GetController().LoadURL( | 2290 contents->web_contents()->GetController().LoadURL( |
| 2288 target_url, | 2291 target_url, |
| 2289 content::Referrer(), | 2292 content::Referrer(), |
| 2290 content::PAGE_TRANSITION_LINK, | 2293 content::PAGE_TRANSITION_LINK, |
| 2291 std::string()); // No extra headers. | 2294 std::string()); // No extra headers. |
| 2292 } | 2295 } |
| 2293 | 2296 |
| 2294 return contents != NULL; | 2297 return contents != NULL; |
| 2295 } | 2298 } |
| OLD | NEW |