Commit a30c4e9c authored by Daniel Nicoara's avatar Daniel Nicoara Committed by Commit Bot

[Chromecast] Set view name based on params.activity_id

Set the window name since it makes it easier to track windows while
debugging.

BUG=None
TEST=Compiled

Change-Id: I301c3c55dc5709d7b009c140d4bff57cccad3809
Reviewed-on: https://chromium-review.googlesource.com/1121081Reviewed-by: default avatarSergey Volk <servolk@chromium.org>
Commit-Queue: Daniel Nicoara <dnicoara@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577705}
parent 8d34dfe8
......@@ -78,6 +78,9 @@ CastWebViewDefault::CastWebViewDefault(
DCHECK(window_);
content::WebContentsObserver::Observe(web_contents_.get());
web_contents_->SetDelegate(this);
#if defined(USE_AURA)
web_contents_->GetNativeView()->SetName(params.activity_id);
#endif
#if BUILDFLAG(IS_ANDROID_THINGS)
// Configure the ducking multiplier for AThings speakers. When CMA backend is
......
......@@ -11,6 +11,7 @@
#include "content/public/browser/web_contents_observer.h"
#include "extensions/browser/extension_system.h"
#include "net/base/net_errors.h"
#include "ui/aura/window.h"
namespace chromecast {
......@@ -35,6 +36,7 @@ CastWebViewExtension::CastWebViewExtension(
shell::CastBrowserProcess::GetInstance()->remote_debugging_server()) {
DCHECK(delegate_);
content::WebContentsObserver::Observe(web_contents());
web_contents()->GetNativeView()->SetName(params.activity_id);
// If this CastWebView is enabled for development, start the remote debugger.
if (params.enabled_for_dev) {
LOG(INFO) << "Enabling dev console for " << web_contents()->GetVisibleURL();
......
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