| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/android/download/download_controller.h" | 5 #include "chrome/browser/android/download/download_controller.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/android/context_utils.h" | 10 #include "base/android/context_utils.h" |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 } | 321 } |
| 322 | 322 |
| 323 DCHECK(java_object_); | 323 DCHECK(java_object_); |
| 324 return java_object_; | 324 return java_object_; |
| 325 } | 325 } |
| 326 | 326 |
| 327 void DownloadController::StartContextMenuDownload( | 327 void DownloadController::StartContextMenuDownload( |
| 328 const ContextMenuParams& params, WebContents* web_contents, bool is_link, | 328 const ContextMenuParams& params, WebContents* web_contents, bool is_link, |
| 329 const std::string& extra_headers) { | 329 const std::string& extra_headers) { |
| 330 int process_id = web_contents->GetRenderProcessHost()->GetID(); | 330 int process_id = web_contents->GetRenderProcessHost()->GetID(); |
| 331 int routing_id = web_contents->GetRoutingID(); | 331 int routing_id = web_contents->GetRenderViewHost()->GetRoutingID(); |
| 332 AcquireFileAccessPermission( | 332 AcquireFileAccessPermission( |
| 333 web_contents, base::Bind(&CreateContextMenuDownload, process_id, | 333 web_contents, base::Bind(&CreateContextMenuDownload, process_id, |
| 334 routing_id, params, is_link, extra_headers)); | 334 routing_id, params, is_link, extra_headers)); |
| 335 } | 335 } |
| 336 | 336 |
| OLD | NEW |