Commit 9e5b7a04 authored by Kazuki Takise's avatar Kazuki Takise Committed by Commit Bot

Return all windows in GetAppWindowList()

Currently the following windows are not included as we use the same
logic as building a list for the cycler:
- PIP
- Non-activatable windows
- Windows with HIDE_IN_OVERVIEW key.

In MAPIP, the PIP window is not included in the list returned by
BuildWindowForCycleWithPipList as we don't want to show both the pip
and original window in the cycler.
The actual issue we are facing is, currently we use this list to
query Chrome windows from Tast, but as PIP is not included in this
list, Tast can't find the PIP window.

BUG=b:145552924
BUG=b:141899229
TEST=tast --verbose run dut arc.PIP

Change-Id: I16d67f14d8f3bf666e8c2b9a7c2ee99b6740a509
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2026911
Commit-Queue: Kazuki Takise <takise@chromium.org>
Auto-Submit: Kazuki Takise <takise@chromium.org>
Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Cr-Commit-Position: refs/heads/master@{#746737}
parent 9d8aad90
...@@ -81,8 +81,7 @@ class LauncherStateWaiter { ...@@ -81,8 +81,7 @@ class LauncherStateWaiter {
std::vector<aura::Window*> GetAppWindowList() { std::vector<aura::Window*> GetAppWindowList() {
ScopedSkipUserSessionBlockedCheck skip_session_blocked; ScopedSkipUserSessionBlockedCheck skip_session_blocked;
return Shell::Get()->mru_window_tracker()->BuildWindowForCycleWithPipList( return Shell::Get()->mru_window_tracker()->BuildAppWindowList(kAllDesks);
kAllDesks);
} }
bool WaitForLauncherState(AppListViewState target_state, bool WaitForLauncherState(AppListViewState target_state,
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <algorithm> #include <algorithm>
#include "ash/public/cpp/app_types.h"
#include "ash/public/cpp/shell_window_ids.h" #include "ash/public/cpp/shell_window_ids.h"
#include "ash/public/cpp/window_properties.h" #include "ash/public/cpp/window_properties.h"
#include "ash/session/session_controller_impl.h" #include "ash/session/session_controller_impl.h"
...@@ -208,6 +209,15 @@ MruWindowTracker::~MruWindowTracker() { ...@@ -208,6 +209,15 @@ MruWindowTracker::~MruWindowTracker() {
window->RemoveObserver(this); window->RemoveObserver(this);
} }
MruWindowTracker::WindowList MruWindowTracker::BuildAppWindowList(
DesksMruType desks_mru_type) const {
return BuildWindowListInternal(
&mru_windows_, desks_mru_type, [](aura::Window* w) {
return w->GetProperty(aura::client::kAppType) !=
static_cast<int>(ash::AppType::NON_APP);
});
}
MruWindowTracker::WindowList MruWindowTracker::BuildMruWindowList( MruWindowTracker::WindowList MruWindowTracker::BuildMruWindowList(
DesksMruType desks_mru_type) const { DesksMruType desks_mru_type) const {
return BuildWindowListInternal(&mru_windows_, desks_mru_type, return BuildWindowListInternal(&mru_windows_, desks_mru_type,
......
...@@ -49,6 +49,14 @@ class ASH_EXPORT MruWindowTracker : public ::wm::ActivationChangeObserver, ...@@ -49,6 +49,14 @@ class ASH_EXPORT MruWindowTracker : public ::wm::ActivationChangeObserver,
MruWindowTracker(); MruWindowTracker();
~MruWindowTracker() override; ~MruWindowTracker() override;
// Returns the set windows in the mru list regardless of whether they can be
// included in the cycler or not.
// |desks_mru_type| determines whether to include or exclude windows from the
// inactive desks.
// TODO(oshima|afakhry): Investigate if we can consolidate BuildXXXList
// methods with parameters.
WindowList BuildAppWindowList(DesksMruType desks_mru_type) const;
// Returns the set of windows which can be cycled through using the tracked // Returns the set of windows which can be cycled through using the tracked
// list of most recently used windows. // list of most recently used windows.
// |desks_mru_type| determines whether to include or exclude windows from the // |desks_mru_type| determines whether to include or exclude windows from the
......
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