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
39
40
41
42
43
44
ash / public / cpp / split_view_test_api.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_SPLIT_VIEW_TEST_API_H_
#define ASH_PUBLIC_CPP_SPLIT_VIEW_TEST_API_H_
#include "ash/ash_export.h"
#include "ash/wm/splitview/split_view_controller.h"
#include "ash/wm/splitview/split_view_types.h"
namespace aura {
class Window;
} // namespace aura
namespace ash {
// Provides access to the limited functions of SplitViewController for testing.
class ASH_EXPORT SplitViewTestApi {
public:
SplitViewTestApi();
SplitViewTestApi(const SplitViewTestApi&) = delete;
SplitViewTestApi& operator=(const SplitViewTestApi&) = delete;
~SplitViewTestApi();
// Snaps the window to the `snap_position` in the split view.
void SnapWindow(aura::Window* window, SnapPosition snap_position);
// Swaps primary and secondary windows in the split view.
void SwapWindows();
// Gets the primary and secondary window in the split view. Returns null if
// there isn't one.
aura::Window* GetPrimaryWindow() const;
aura::Window* GetSecondaryWindow() const;
const raw_ptr<SplitViewController> controller_;
};
} // namespace ash
#endif // ASH_PUBLIC_CPP_SPLIT_VIEW_TEST_API_H_