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

Unified Diff: chrome/browser/extensions/api/tab_capture/offscreen_tab.cc

Issue 2259533003: Use bounds instead of size for prerender requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile on mac, update .mm Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/tab_capture/offscreen_tab.cc
diff --git a/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc b/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc
index ddc31cf18549dfeffde8653079308719039f378f..d7e26772b4f17f67bb2c13209f3559be533ac4f9 100644
--- a/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc
+++ b/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc
@@ -98,7 +98,8 @@ void OffscreenTab::Start(const GURL& start_url,
// Set initial size, if specified.
if (!initial_size.IsEmpty())
- ResizeWebContents(offscreen_tab_web_contents_.get(), initial_size);
+ ResizeWebContents(offscreen_tab_web_contents_.get(),
+ gfx::Rect(initial_size));
// Mute audio output. When tab capture starts, the audio will be
// automatically unmuted, but will be captured into the MediaStream.
@@ -227,7 +228,7 @@ void OffscreenTab::EnterFullscreenModeForTab(WebContents* contents,
contents->GetRenderWidgetHostView()->GetViewBounds().size();
if (contents->GetCapturerCount() >= 0 &&
!contents->GetPreferredSize().IsEmpty()) {
- ResizeWebContents(contents, contents->GetPreferredSize());
+ ResizeWebContents(contents, gfx::Rect(contents->GetPreferredSize()));
}
}
@@ -237,7 +238,7 @@ void OffscreenTab::ExitFullscreenModeForTab(WebContents* contents) {
if (!in_fullscreen_mode())
return;
- ResizeWebContents(contents, non_fullscreen_size_);
+ ResizeWebContents(contents, gfx::Rect(non_fullscreen_size_));
non_fullscreen_size_ = gfx::Size();
}

Powered by Google App Engine
This is Rietveld 408576698