1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
ash / public / cpp / autotest_private_api_utils.h [blame]
// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_PUBLIC_CPP_AUTOTEST_PRIVATE_API_UTILS_H_
#define ASH_PUBLIC_CPP_AUTOTEST_PRIVATE_API_UTILS_H_
#include <vector>
#include "ash/ash_export.h"
#include "ash/public/cpp/app_list/app_list_types.h"
#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
namespace aura {
class Window;
}
// Utility functions for autotest private APIs and ShellTestAPI.
namespace ash {
// Get application windows, windows that are shown in overview grid.
ASH_EXPORT std::vector<raw_ptr<aura::Window, VectorExperimental>>
GetAppWindowList();
// Runs the callback when the launcher state becomes |state| after
// state transition animation. For clamshell launcher, it invokes closure
// immediately if the state is already at the target state. For home
// launcher, the caller is responsible for making sure the transition
// will happen. (This is because the detecting the home launcher state
// correctly isn't trivial).
// Returns true if the closure has been invoked.
ASH_EXPORT bool WaitForLauncherState(AppListViewState state,
base::OnceClosure closure);
} // namespace ash
#endif // ASH_PUBLIC_CPP_AUTOTEST_PRIVATE_API_UTILS_H_