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->ShouldShowInDownloadsUI()) { | |
1433 fprintf(stderr, "%s skipping\n", __PRETTY_FUNCTION__); | |
Greg Billock
2012/10/02 19:12:20
Take out printfs.
sail
2012/10/02 19:14:51
Done.
Oops, removed.
| |
1434 return; | |
1435 } else { | |
1436 fprintf(stderr, "%s NOT skipping\n", __PRETTY_FUNCTION__); | |
1437 } | |
1438 | |
1432 WebContents* constrained = GetConstrainingWebContents(source); | 1439 WebContents* constrained = GetConstrainingWebContents(source); |
1433 if (constrained != source) { | 1440 if (constrained != source) { |
1434 // Download in a constrained popup is shown in the tab that opened it. | 1441 // Download in a constrained popup is shown in the tab that opened it. |
1435 constrained->GetDelegate()->OnStartDownload(constrained, download); | 1442 constrained->GetDelegate()->OnStartDownload(constrained, download); |
1436 return; | 1443 return; |
1437 } | 1444 } |
1438 | 1445 |
1439 if (!window()) | 1446 if (!window()) |
1440 return; | 1447 return; |
1441 | 1448 |
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2300 if (contents && !allow_js_access) { | 2307 if (contents && !allow_js_access) { |
2301 contents->web_contents()->GetController().LoadURL( | 2308 contents->web_contents()->GetController().LoadURL( |
2302 target_url, | 2309 target_url, |
2303 content::Referrer(), | 2310 content::Referrer(), |
2304 content::PAGE_TRANSITION_LINK, | 2311 content::PAGE_TRANSITION_LINK, |
2305 std::string()); // No extra headers. | 2312 std::string()); // No extra headers. |
2306 } | 2313 } |
2307 | 2314 |
2308 return contents != NULL; | 2315 return contents != NULL; |
2309 } | 2316 } |
OLD | NEW |