| 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 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1431 void Browser::RenderWidgetShowing() { | 1431 void Browser::RenderWidgetShowing() { |
| 1432 window_->DisableInactiveFrame(); | 1432 window_->DisableInactiveFrame(); |
| 1433 } | 1433 } |
| 1434 | 1434 |
| 1435 int Browser::GetExtraRenderViewHeight() const { | 1435 int Browser::GetExtraRenderViewHeight() const { |
| 1436 return window_->GetExtraRenderViewHeight(); | 1436 return window_->GetExtraRenderViewHeight(); |
| 1437 } | 1437 } |
| 1438 | 1438 |
| 1439 void Browser::OnStartDownload(WebContents* source, | 1439 void Browser::OnStartDownload(WebContents* source, |
| 1440 content::DownloadItem* download) { | 1440 content::DownloadItem* download) { |
| 1441 if (!download_util::ShouldShowInShelf(download)) |
| 1442 return; |
| 1443 |
| 1441 WebContents* constrained = GetConstrainingWebContents(source); | 1444 WebContents* constrained = GetConstrainingWebContents(source); |
| 1442 if (constrained != source) { | 1445 if (constrained != source) { |
| 1443 // Download in a constrained popup is shown in the tab that opened it. | 1446 // Download in a constrained popup is shown in the tab that opened it. |
| 1444 constrained->GetDelegate()->OnStartDownload(constrained, download); | 1447 constrained->GetDelegate()->OnStartDownload(constrained, download); |
| 1445 return; | 1448 return; |
| 1446 } | 1449 } |
| 1447 | 1450 |
| 1448 if (!window()) | 1451 if (!window()) |
| 1449 return; | 1452 return; |
| 1450 | 1453 |
| (...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2307 if (contents && !allow_js_access) { | 2310 if (contents && !allow_js_access) { |
| 2308 contents->web_contents()->GetController().LoadURL( | 2311 contents->web_contents()->GetController().LoadURL( |
| 2309 target_url, | 2312 target_url, |
| 2310 content::Referrer(), | 2313 content::Referrer(), |
| 2311 content::PAGE_TRANSITION_LINK, | 2314 content::PAGE_TRANSITION_LINK, |
| 2312 std::string()); // No extra headers. | 2315 std::string()); // No extra headers. |
| 2313 } | 2316 } |
| 2314 | 2317 |
| 2315 return contents != NULL; | 2318 return contents != NULL; |
| 2316 } | 2319 } |
| OLD | NEW |