| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/extensions/api/tab_capture/offscreen_tab.h" | 5 #include "chrome/browser/extensions/api/tab_capture/offscreen_tab.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 const content::DropData& data, | 212 const content::DropData& data, |
| 213 blink::WebDragOperationsMask operations_allowed) { | 213 blink::WebDragOperationsMask operations_allowed) { |
| 214 DCHECK_EQ(offscreen_tab_web_contents_.get(), source); | 214 DCHECK_EQ(offscreen_tab_web_contents_.get(), source); |
| 215 // Halt all drag attempts onto the page since there should be no direct user | 215 // Halt all drag attempts onto the page since there should be no direct user |
| 216 // interaction with it. | 216 // interaction with it. |
| 217 return false; | 217 return false; |
| 218 } | 218 } |
| 219 | 219 |
| 220 bool OffscreenTab::ShouldCreateWebContents( | 220 bool OffscreenTab::ShouldCreateWebContents( |
| 221 content::WebContents* web_contents, | 221 content::WebContents* web_contents, |
| 222 content::RenderFrameHost* opener, |
| 222 content::SiteInstance* source_site_instance, | 223 content::SiteInstance* source_site_instance, |
| 223 int32_t route_id, | 224 int32_t route_id, |
| 224 int32_t main_frame_route_id, | 225 int32_t main_frame_route_id, |
| 225 int32_t main_frame_widget_route_id, | 226 int32_t main_frame_widget_route_id, |
| 226 content::mojom::WindowContainerType window_container_type, | 227 content::mojom::WindowContainerType window_container_type, |
| 227 const GURL& opener_url, | 228 const GURL& opener_url, |
| 228 const std::string& frame_name, | 229 const std::string& frame_name, |
| 229 const GURL& target_url, | 230 const GURL& target_url, |
| 230 const std::string& partition_id, | 231 const std::string& partition_id, |
| 231 content::SessionStorageNamespace* session_storage_namespace) { | 232 content::SessionStorageNamespace* session_storage_namespace) { |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 | 377 |
| 377 // Schedule the timer to check again in a second. | 378 // Schedule the timer to check again in a second. |
| 378 capture_poll_timer_.Start( | 379 capture_poll_timer_.Start( |
| 379 FROM_HERE, | 380 FROM_HERE, |
| 380 base::TimeDelta::FromSeconds(kPollIntervalInSeconds), | 381 base::TimeDelta::FromSeconds(kPollIntervalInSeconds), |
| 381 base::Bind(&OffscreenTab::DieIfContentCaptureEnded, | 382 base::Bind(&OffscreenTab::DieIfContentCaptureEnded, |
| 382 base::Unretained(this))); | 383 base::Unretained(this))); |
| 383 } | 384 } |
| 384 | 385 |
| 385 } // namespace extensions | 386 } // namespace extensions |
| OLD | NEW |