blob: 516b40cff30452ea87060bee7174003b4676cf74 [file] [log] [blame]
Sammie Quonb2223fc2018-12-06 01:34:521// Copyright 2018 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef ASH_WM_WINDOW_PREVIEW_VIEW_TEST_API_H_
6#define ASH_WM_WINDOW_PREVIEW_VIEW_TEST_API_H_
7
8#include "ash/wm/window_mirror_view.h"
9#include "base/containers/flat_map.h"
10#include "base/macros.h"
11#include "ui/aura/window.h"
12#include "ui/gfx/geometry/rect_f.h"
13
14namespace views {
15class Widget;
16} // namespace views
17
18namespace ash {
Sammie Quonb2223fc2018-12-06 01:34:5219
20class WindowPreviewView;
21
22// Use the api in this class to test WindowPreviewView.
23class WindowPreviewViewTestApi {
24 public:
25 explicit WindowPreviewViewTestApi(WindowPreviewView* preview_view);
26 ~WindowPreviewViewTestApi();
27
28 gfx::RectF GetUnionRect() const;
29
30 const base::flat_map<aura::Window*, WindowMirrorView*>& GetMirrorViews()
31 const;
32
33 // Gets the mirror view in |mirror_views_| associated with |widget|. Returns
34 // null if |widget|'s window does not exist in |mirror_views_|.
James Cook00e65e92019-07-25 03:19:0835 WindowMirrorView* GetMirrorViewForWidget(views::Widget* widget);
Sammie Quonb2223fc2018-12-06 01:34:5236
37 private:
38 WindowPreviewView* preview_view_;
39
40 DISALLOW_COPY_AND_ASSIGN(WindowPreviewViewTestApi);
41};
42
Sammie Quonb2223fc2018-12-06 01:34:5243} // namespace ash
44
45#endif // ASH_WM_WINDOW_PREVIEW_VIEW_TEST_API_H_