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 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1422 void Browser::RenderWidgetShowing() { | 1422 void Browser::RenderWidgetShowing() { |
1423 window_->DisableInactiveFrame(); | 1423 window_->DisableInactiveFrame(); |
1424 } | 1424 } |
1425 | 1425 |
1426 int Browser::GetExtraRenderViewHeight() const { | 1426 int Browser::GetExtraRenderViewHeight() const { |
1427 return window_->GetExtraRenderViewHeight(); | 1427 return window_->GetExtraRenderViewHeight(); |
1428 } | 1428 } |
1429 | 1429 |
1430 void Browser::OnStartDownload(WebContents* source, | 1430 void Browser::OnStartDownload(WebContents* source, |
1431 content::DownloadItem* download) { | 1431 content::DownloadItem* download) { |
| 1432 if (download->IsHiddenDownload()) |
| 1433 return; |
| 1434 |
1432 WebContents* constrained = GetConstrainingWebContents(source); | 1435 WebContents* constrained = GetConstrainingWebContents(source); |
1433 if (constrained != source) { | 1436 if (constrained != source) { |
1434 // Download in a constrained popup is shown in the tab that opened it. | 1437 // Download in a constrained popup is shown in the tab that opened it. |
1435 constrained->GetDelegate()->OnStartDownload(constrained, download); | 1438 constrained->GetDelegate()->OnStartDownload(constrained, download); |
1436 return; | 1439 return; |
1437 } | 1440 } |
1438 | 1441 |
1439 if (!window()) | 1442 if (!window()) |
1440 return; | 1443 return; |
1441 | 1444 |
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2300 if (contents && !allow_js_access) { | 2303 if (contents && !allow_js_access) { |
2301 contents->web_contents()->GetController().LoadURL( | 2304 contents->web_contents()->GetController().LoadURL( |
2302 target_url, | 2305 target_url, |
2303 content::Referrer(), | 2306 content::Referrer(), |
2304 content::PAGE_TRANSITION_LINK, | 2307 content::PAGE_TRANSITION_LINK, |
2305 std::string()); // No extra headers. | 2308 std::string()); // No extra headers. |
2306 } | 2309 } |
2307 | 2310 |
2308 return contents != NULL; | 2311 return contents != NULL; |
2309 } | 2312 } |
OLD | NEW |