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