| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "components/offline_pages/content/background_loader/background_loader_c
ontents.h" | 5 #include "components/offline_pages/content/background_loader/background_loader_c
ontents.h" |
| 6 | 6 |
| 7 #include "content/public/browser/web_contents.h" | 7 #include "content/public/browser/web_contents.h" |
| 8 | 8 |
| 9 namespace background_loader { | 9 namespace background_loader { |
| 10 | 10 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 void BackgroundLoaderContents::CanDownload( | 56 void BackgroundLoaderContents::CanDownload( |
| 57 const GURL& url, | 57 const GURL& url, |
| 58 const std::string& request_method, | 58 const std::string& request_method, |
| 59 const base::Callback<void(bool)>& callback) { | 59 const base::Callback<void(bool)>& callback) { |
| 60 // Do not download anything. | 60 // Do not download anything. |
| 61 callback.Run(false); | 61 callback.Run(false); |
| 62 } | 62 } |
| 63 | 63 |
| 64 bool BackgroundLoaderContents::ShouldCreateWebContents( | 64 bool BackgroundLoaderContents::ShouldCreateWebContents( |
| 65 content::WebContents* web_contents, | 65 content::WebContents* web_contents, |
| 66 content::RenderFrameHost* opener, |
| 66 content::SiteInstance* source_site_instance, | 67 content::SiteInstance* source_site_instance, |
| 67 int32_t route_id, | 68 int32_t route_id, |
| 68 int32_t main_frame_route_id, | 69 int32_t main_frame_route_id, |
| 69 int32_t main_frame_widget_route_id, | 70 int32_t main_frame_widget_route_id, |
| 70 content::mojom::WindowContainerType window_container_type, | 71 content::mojom::WindowContainerType window_container_type, |
| 71 const GURL& opener_url, | 72 const GURL& opener_url, |
| 72 const std::string& frame_name, | 73 const std::string& frame_name, |
| 73 const GURL& target_url, | 74 const GURL& target_url, |
| 74 const std::string& partition_id, | 75 const std::string& partition_id, |
| 75 content::SessionStorageNamespace* session_storage_namespace) { | 76 content::SessionStorageNamespace* session_storage_namespace) { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 content::MediaStreamType type) { | 115 content::MediaStreamType type) { |
| 115 return false; // No permissions granted. | 116 return false; // No permissions granted. |
| 116 } | 117 } |
| 117 | 118 |
| 118 BackgroundLoaderContents::BackgroundLoaderContents() | 119 BackgroundLoaderContents::BackgroundLoaderContents() |
| 119 : browser_context_(nullptr) { | 120 : browser_context_(nullptr) { |
| 120 web_contents_.reset(); | 121 web_contents_.reset(); |
| 121 } | 122 } |
| 122 | 123 |
| 123 } // namespace background_loader | 124 } // namespace background_loader |
| OLD | NEW |