diff options
author | tapted@chromium.org <tapted@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-24 06:26:15 +0000 |
---|---|---|
committer | tapted@chromium.org <tapted@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-24 06:26:15 +0000 |
commit | b49d11f89b8c7288c461dcbd4ead0fab7ba44936 (patch) | |
tree | a683404820f7e7c0c73cc64b232b05eec5fddee1 /apps | |
parent | 3a0df311a20fa16c98b0568968a55f81ebbd7841 (diff) | |
download | chromium_src-b49d11f89b8c7288c461dcbd4ead0fab7ba44936.zip chromium_src-b49d11f89b8c7288c461dcbd4ead0fab7ba44936.tar.gz chromium_src-b49d11f89b8c7288c461dcbd4ead0fab7ba44936.tar.bz2 |
Remove reliance on GetActiveDesktop from AppListService::Get()
chrome::GetActiveDesktop() should only be used in tests. On Windows 8
split-screen there are cases where it picks the incorrect desktop
resulting in the incorrect app launcher being used.
Callers of AppListService::Get() are now required to specify the correct
HostDesktopType to increase the likelihood that the correct app list is
returned.
BUG=303524
TEST=Have app launcher & exit from Chrome completely.
- Open Chrome on the Desktop, leave browser window there.
- Open Chrome from Windows 8 Mode. Open and close App Launcher in Ash.
- Go into split screen with Ash in a small part of the screen on the left.
- Open Windows Desktop on the right side. Open App Launcher from the taskbar.
-> App launcher should show in Desktop Mode, not Ash.
Review URL: https://codereview.chromium.org/27650002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230662 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_shim/app_shim_handler_mac.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/app_shim/app_shim_handler_mac.cc b/apps/app_shim/app_shim_handler_mac.cc index 6593155..f50acdb 100644 --- a/apps/app_shim/app_shim_handler_mac.cc +++ b/apps/app_shim/app_shim_handler_mac.cc @@ -25,8 +25,10 @@ namespace { void TerminateIfNoShellWindows() { bool shell_windows_left = apps::ShellWindowRegistry::IsShellWindowRegisteredInAnyProfile(0); - if (!shell_windows_left && !AppListService::Get()->IsAppListVisible()) + if (!shell_windows_left && !AppListService::Get( + chrome::HOST_DESKTOP_TYPE_NATIVE)->IsAppListVisible()) { chrome::AttemptExit(); + } } class AppShimHandlerRegistry : public content::NotificationObserver { |