diff options
author | jhorwich <jhorwich@chromium.org> | 2015-04-21 16:45:37 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-21 23:46:38 +0000 |
commit | 1c007d5de979461ae400c95c4309e2955de094c6 (patch) | |
tree | 70bde0341987448cc5a02954a9373443faada057 /ash | |
parent | 4a4c66059fad05aeb79f7c24f8288a99fe2f5d89 (diff) | |
download | chromium_src-1c007d5de979461ae400c95c4309e2955de094c6.zip chromium_src-1c007d5de979461ae400c95c4309e2955de094c6.tar.gz chromium_src-1c007d5de979461ae400c95c4309e2955de094c6.tar.bz2 |
Remove obsolete code to name Ash root window.
We used to set the root window name to aura_root_0 or aura_root_x in
order to allow Gtalk to share the ChromeOS desktop. This is no longer
necessary.
BUG=392002
TEST=Launch chromeos=1 build on Linux, verify window is untitled.
Review URL: https://codereview.chromium.org/1097363004
Cr-Commit-Position: refs/heads/master@{#326175}
Diffstat (limited to 'ash')
-rw-r--r-- | ash/display/display_controller.cc | 19 | ||||
-rw-r--r-- | ash/display/display_controller.h | 2 | ||||
-rw-r--r-- | ash/display/display_controller_unittest.cc | 43 |
3 files changed, 0 insertions, 64 deletions
diff --git a/ash/display/display_controller.cc b/ash/display/display_controller.cc index 445e804..3dd1bef 100644 --- a/ash/display/display_controller.cc +++ b/ash/display/display_controller.cc @@ -340,7 +340,6 @@ void DisplayController::InitDisplays() { RootWindowController::CreateForSecondaryDisplay(ash_host); } } - UpdateHostWindowNames(); FOR_EACH_OBSERVER(Observer, observers_, OnDisplaysInitialized()); } @@ -797,7 +796,6 @@ void DisplayController::PostDisplayConfigurationChange() { } } FOR_EACH_OBSERVER(Observer, observers_, OnDisplayConfigurationChanged()); - UpdateHostWindowNames(); UpdateMouseLocationAfterDisplayChange(); } @@ -846,21 +844,4 @@ void DisplayController::SetMirrorModeAfterAnimation(bool mirror) { GetDisplayManager()->SetMirrorMode(mirror); } -void DisplayController::UpdateHostWindowNames() { -#if defined(USE_X11) - // crbug.com/120229 - set the window title for the primary dislpay - // to "aura_root_0" so gtalk can find the primary root window to broadcast. - // TODO(jhorwich) Remove this once Chrome supports window-based broadcasting. - aura::Window* primary = Shell::GetPrimaryRootWindow(); - aura::Window::Windows root_windows = Shell::GetAllRootWindows(); - for (size_t i = 0; i < root_windows.size(); ++i) { - std::string name = - root_windows[i] == primary ? "aura_root_0" : "aura_root_x"; - gfx::AcceleratedWidget xwindow = - root_windows[i]->GetHost()->GetAcceleratedWidget(); - XStoreName(gfx::GetXDisplay(), xwindow, name.c_str()); - } -#endif -} - } // namespace ash diff --git a/ash/display/display_controller.h b/ash/display/display_controller.h index e795d77..3dc8189 100644 --- a/ash/display/display_controller.h +++ b/ash/display/display_controller.h @@ -174,8 +174,6 @@ class ASH_EXPORT DisplayController : public gfx::DisplayObserver, void SetMirrorModeAfterAnimation(bool mirror); - void UpdateHostWindowNames(); - class DisplayChangeLimiter { public: DisplayChangeLimiter(); diff --git a/ash/display/display_controller_unittest.cc b/ash/display/display_controller_unittest.cc index 6945fac2..e052f1b 100644 --- a/ash/display/display_controller_unittest.cc +++ b/ash/display/display_controller_unittest.cc @@ -361,23 +361,6 @@ float GetStoredUIScale(int64 id) { GetEffectiveUIScale(); } -#if defined(USE_X11) -void GetPrimaryAndSeconary(aura::Window** primary, - aura::Window** secondary) { - *primary = Shell::GetPrimaryRootWindow(); - aura::Window::Windows root_windows = Shell::GetAllRootWindows(); - *secondary = root_windows[0] == *primary ? root_windows[1] : root_windows[0]; -} - -std::string GetXWindowName(aura::WindowTreeHost* host) { - char* name = NULL; - XFetchName(gfx::GetXDisplay(), host->GetAcceleratedWidget(), &name); - std::string ret(name); - XFree(name); - return ret; -} -#endif - class TestMouseWatcherListener : public views::MouseWatcherListener { public: TestMouseWatcherListener() {} @@ -1307,32 +1290,6 @@ TEST_F(DisplayControllerTest, ReplaceSwappedPrimary) { EXPECT_EQ(20, Shell::GetScreen()->GetPrimaryDisplay().id()); } -#if defined(USE_X11) -TEST_F(DisplayControllerTest, XWidowNameForRootWindow) { - EXPECT_EQ("aura_root_0", GetXWindowName( - Shell::GetPrimaryRootWindow()->GetHost())); - - // Multiple display. - UpdateDisplay("200x200,300x300"); - aura::Window* primary, *secondary; - GetPrimaryAndSeconary(&primary, &secondary); - EXPECT_EQ("aura_root_0", GetXWindowName(primary->GetHost())); - EXPECT_EQ("aura_root_x", GetXWindowName(secondary->GetHost())); - - // Swap primary. - primary = secondary = NULL; - Shell::GetInstance()->display_controller()->SwapPrimaryDisplay(); - GetPrimaryAndSeconary(&primary, &secondary); - EXPECT_EQ("aura_root_0", GetXWindowName(primary->GetHost())); - EXPECT_EQ("aura_root_x", GetXWindowName(secondary->GetHost())); - - // Switching back to single display. - UpdateDisplay("300x400"); - EXPECT_EQ("aura_root_0", GetXWindowName( - Shell::GetPrimaryRootWindow()->GetHost())); -} -#endif - TEST_F(DisplayControllerTest, UpdateMouseLocationAfterDisplayChange) { if (!SupportsMultipleDisplays()) return; |