| 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 2487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2498 post_id = entry->GetPostID(); | 2498 post_id = entry->GetPostID(); |
| 2499 } | 2499 } |
| 2500 DownloadSaveInfo save_info; | 2500 DownloadSaveInfo save_info; |
| 2501 save_info.prompt_for_save_location = true; | 2501 save_info.prompt_for_save_location = true; |
| 2502 dlm->DownloadUrl(url, | 2502 dlm->DownloadUrl(url, |
| 2503 referrer, | 2503 referrer, |
| 2504 "", | 2504 "", |
| 2505 true, // prefer_cache | 2505 true, // prefer_cache |
| 2506 post_id, | 2506 post_id, |
| 2507 save_info, | 2507 save_info, |
| 2508 this); | 2508 this, |
| 2509 DownloadManager::OnStartedCallback()); |
| 2509 } | 2510 } |
| 2510 | 2511 |
| 2511 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 2512 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { |
| 2512 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); | 2513 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); |
| 2513 // Can be NULL during tests. | 2514 // Can be NULL during tests. |
| 2514 if (rwh_view) | 2515 if (rwh_view) |
| 2515 rwh_view->SetSize(GetView()->GetContainerSize()); | 2516 rwh_view->SetSize(GetView()->GetContainerSize()); |
| 2516 } | 2517 } |
| 2517 | 2518 |
| 2518 RenderViewHostImpl* TabContents::GetRenderViewHostImpl() { | 2519 RenderViewHostImpl* TabContents::GetRenderViewHostImpl() { |
| 2519 return static_cast<RenderViewHostImpl*>(GetRenderViewHost()); | 2520 return static_cast<RenderViewHostImpl*>(GetRenderViewHost()); |
| 2520 } | 2521 } |
| OLD | NEW |