Sammie Quon | b2223fc | 2018-12-06 01:34:52 | [diff] [blame] | 1 | // 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 | |
| 14 | namespace views { |
| 15 | class Widget; |
| 16 | } // namespace views |
| 17 | |
| 18 | namespace ash { |
Sammie Quon | b2223fc | 2018-12-06 01:34:52 | [diff] [blame] | 19 | |
| 20 | class WindowPreviewView; |
| 21 | |
| 22 | // Use the api in this class to test WindowPreviewView. |
| 23 | class 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 Cook | 00e65e9 | 2019-07-25 03:19:08 | [diff] [blame] | 35 | WindowMirrorView* GetMirrorViewForWidget(views::Widget* widget); |
Sammie Quon | b2223fc | 2018-12-06 01:34:52 | [diff] [blame] | 36 | |
| 37 | private: |
| 38 | WindowPreviewView* preview_view_; |
| 39 | |
| 40 | DISALLOW_COPY_AND_ASSIGN(WindowPreviewViewTestApi); |
| 41 | }; |
| 42 | |
Sammie Quon | b2223fc | 2018-12-06 01:34:52 | [diff] [blame] | 43 | } // namespace ash |
| 44 | |
| 45 | #endif // ASH_WM_WINDOW_PREVIEW_VIEW_TEST_API_H_ |