Commit 3e6addd4 authored by Yuichiro Hanada's avatar Yuichiro Hanada Committed by Commit Bot

Don't forget an extra title sent before Widget is created.

The extra title of ClientControlledShellSurface can be sent before
Widget of it is created. This CL makes it remember the extra title and
apply it after Widget is created.

Bug: 1143236
Test: Enable the debug option and open any ARC app
Change-Id: I9d992e3febf6370f32d915174ed30f87ce13c9c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2505351Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Commit-Queue: Yuichiro Hanada <yhanada@chromium.org>
Cr-Commit-Position: refs/heads/master@{#822126}
parent d18316fb
......@@ -591,8 +591,10 @@ void ClientControlledShellSurface::SetExtraTitle(
TRACE_EVENT1("exo", "ClientControlledShellSurface::SetExtraTitle",
"extra_title", base::UTF16ToUTF8(extra_title));
if (!widget_)
if (!widget_) {
initial_extra_title_ = extra_title;
return;
}
GetFrameView()->GetHeaderView()->GetFrameHeader()->SetFrameTextOverride(
extra_title);
......@@ -1046,6 +1048,8 @@ void ClientControlledShellSurface::InitializeWindowState(
UpdateFrameWidth();
if (initial_orientation_lock_ != ash::OrientationLockType::kAny)
SetOrientationLock(initial_orientation_lock_);
if (initial_extra_title_ != base::string16())
SetExtraTitle(initial_extra_title_);
// Register Client controlled accelerators.
views::FocusManager* focus_manager = widget_->GetFocusManager();
......
......@@ -367,6 +367,8 @@ class ClientControlledShellSurface : public ShellSurfaceBase,
// widget is not created yet orientation lock is being set.
ash::OrientationLockType initial_orientation_lock_ =
ash::OrientationLockType::kAny;
// The extra title to be applied when widget is being created.
base::string16 initial_extra_title_ = base::string16();
bool preserve_widget_bounds_ = false;
......
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