Commit 0cf17084 authored by Luke Halliwell's avatar Luke Halliwell Committed by Commit Bot

[Chromecast] Clear video plane image on app start

This ensures a clean start including the case where an
app previously set a video plane image and then crashed.

Bug: internal b/65155280
Test: Force stop cast_shell, start transparent app
Change-Id: Ia04604274736327e1af4dafe75ebba2f088d57be
Reviewed-on: https://chromium-review.googlesource.com/666386Reviewed-by: default avatarSergey Volk <servolk@chromium.org>
Commit-Queue: Luke Halliwell <halliwell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501836}
parent 3148a21a
......@@ -12,6 +12,7 @@
#include "chromecast/base/cast_features.h"
#include "chromecast/base/metrics/cast_metrics_helper.h"
#include "chromecast/browser/cast_web_contents_manager.h"
#include "chromecast/public/cast_media_shlib.h"
#include "content/public/browser/media_capture_devices.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/render_frame_host.h"
......@@ -109,6 +110,10 @@ void CastWebView::CloseContents(content::WebContents* source) {
}
void CastWebView::Show(CastWindowManager* window_manager) {
if (media::CastMediaShlib::ClearVideoPlaneImage) {
media::CastMediaShlib::ClearVideoPlaneImage();
}
DCHECK(window_manager);
window_->ShowWebContents(web_contents_.get(), window_manager);
web_contents_->Focus();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment