Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Side by Side Diff: chrome/browser/extensions/api/tab_capture/offscreen_presentation.cc

Issue 1303773002: Give the main frame a RenderWidget. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_presentation.h" 5 #include "chrome/browser/extensions/api/tab_capture/offscreen_presentation.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "chrome/browser/extensions/api/tab_capture/tab_capture_registry.h" 10 #include "chrome/browser/extensions/api/tab_capture/tab_capture_registry.h"
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 const content::DropData& data, 300 const content::DropData& data,
301 blink::WebDragOperationsMask operations_allowed) { 301 blink::WebDragOperationsMask operations_allowed) {
302 DCHECK_EQ(presentation_web_contents_.get(), source); 302 DCHECK_EQ(presentation_web_contents_.get(), source);
303 // Halt all drag attempts onto the page since there should be no direct user 303 // Halt all drag attempts onto the page since there should be no direct user
304 // interaction with it. 304 // interaction with it.
305 return false; 305 return false;
306 } 306 }
307 307
308 bool OffscreenPresentation::ShouldCreateWebContents( 308 bool OffscreenPresentation::ShouldCreateWebContents(
309 WebContents* contents, 309 WebContents* contents,
310 int route_id, 310 int32 route_id,
311 int main_frame_route_id, 311 int32 main_frame_route_id,
312 int32 main_frame_widget_route_id,
312 WindowContainerType window_container_type, 313 WindowContainerType window_container_type,
313 const std::string& frame_name, 314 const std::string& frame_name,
314 const GURL& target_url, 315 const GURL& target_url,
315 const std::string& partition_id, 316 const std::string& partition_id,
316 content::SessionStorageNamespace* session_storage_namespace) { 317 content::SessionStorageNamespace* session_storage_namespace) {
317 DCHECK_EQ(presentation_web_contents_.get(), contents); 318 DCHECK_EQ(presentation_web_contents_.get(), contents);
318 // Disallow creating separate WebContentses. The WebContents implementation 319 // Disallow creating separate WebContentses. The WebContents implementation
319 // uses this to spawn new windows/tabs, which is also not allowed for 320 // uses this to spawn new windows/tabs, which is also not allowed for
320 // presentation pages. 321 // presentation pages.
321 return false; 322 return false;
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 469
469 // Schedule the timer to check again in a second. 470 // Schedule the timer to check again in a second.
470 capture_poll_timer_.Start( 471 capture_poll_timer_.Start(
471 FROM_HERE, 472 FROM_HERE,
472 base::TimeDelta::FromSeconds(kPollIntervalInSeconds), 473 base::TimeDelta::FromSeconds(kPollIntervalInSeconds),
473 base::Bind(&OffscreenPresentation::DieIfContentCaptureEnded, 474 base::Bind(&OffscreenPresentation::DieIfContentCaptureEnded,
474 base::Unretained(this))); 475 base::Unretained(this)));
475 } 476 }
476 477
477 } // namespace extensions 478 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698