Include the display description in the picker on ChromeOS

The DesktopMediaListAsh uses the AuraWindow's title as the description
for the desktop source (window or screen.) To ensure that the display's
description appears we need to set the root window's title to the
display's name. This display name matches the name shown in the display
configuration UI.

BUG=372444
TEST=In a multiple display environment trigger the picker and observe
that the displays' names are included and match those in the display
settings UI.

Review URL: https://codereview.chromium.org/314733003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274599 0039d316-1c4b-4281-b951-d872f2087c98
parent 8b158e44
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "ash/wm/coordinate_conversion.h" #include "ash/wm/coordinate_conversion.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/strings/stringprintf.h" #include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "ui/aura/client/capture_client.h" #include "ui/aura/client/capture_client.h"
#include "ui/aura/client/focus_client.h" #include "ui/aura/client/focus_client.h"
#include "ui/aura/client/screen_position_client.h" #include "ui/aura/client/screen_position_client.h"
...@@ -724,6 +725,7 @@ AshWindowTreeHost* DisplayController::AddWindowTreeHostForDisplay( ...@@ -724,6 +725,7 @@ AshWindowTreeHost* DisplayController::AddWindowTreeHostForDisplay(
aura::WindowTreeHost* host = ash_host->AsWindowTreeHost(); aura::WindowTreeHost* host = ash_host->AsWindowTreeHost();
host->window()->SetName(base::StringPrintf("RootWindow-%d", host_count++)); host->window()->SetName(base::StringPrintf("RootWindow-%d", host_count++));
host->window()->set_title(base::UTF8ToUTF16(display_info.name()));
host->compositor()->SetBackgroundColor(SK_ColorBLACK); host->compositor()->SetBackgroundColor(SK_ColorBLACK);
// No need to remove our observer observer because the DisplayController // No need to remove our observer observer because the DisplayController
// outlives the host. // outlives the host.
......
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