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 "content/browser/tab_contents/tab_contents.h" | 5 #include "content/browser/tab_contents/tab_contents.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 2494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2505 post_id = entry->GetPostID(); | 2505 post_id = entry->GetPostID(); |
2506 } | 2506 } |
2507 DownloadSaveInfo save_info; | 2507 DownloadSaveInfo save_info; |
2508 save_info.prompt_for_save_location = true; | 2508 save_info.prompt_for_save_location = true; |
2509 dlm->DownloadUrl(url, | 2509 dlm->DownloadUrl(url, |
2510 referrer, | 2510 referrer, |
2511 "", | 2511 "", |
2512 true, // prefer_cache | 2512 true, // prefer_cache |
2513 post_id, | 2513 post_id, |
2514 save_info, | 2514 save_info, |
2515 this); | 2515 this, |
| 2516 DownloadManager::OnStartedCallback()); |
2516 } | 2517 } |
2517 | 2518 |
2518 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 2519 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { |
2519 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); | 2520 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); |
2520 // Can be NULL during tests. | 2521 // Can be NULL during tests. |
2521 if (rwh_view) | 2522 if (rwh_view) |
2522 rwh_view->SetSize(GetView()->GetContainerSize()); | 2523 rwh_view->SetSize(GetView()->GetContainerSize()); |
2523 } | 2524 } |
2524 | 2525 |
2525 RenderViewHostImpl* TabContents::GetRenderViewHostImpl() { | 2526 RenderViewHostImpl* TabContents::GetRenderViewHostImpl() { |
2526 return static_cast<RenderViewHostImpl*>(GetRenderViewHost()); | 2527 return static_cast<RenderViewHostImpl*>(GetRenderViewHost()); |
2527 } | 2528 } |
OLD | NEW |