1 // Copyright 2019 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 UI_VIEWS_TEST_DESKTOP_WINDOW_TREE_HOST_WIN_TEST_API_H_ 6 #define UI_VIEWS_TEST_DESKTOP_WINDOW_TREE_HOST_WIN_TEST_API_H_ 7 8 #include "base/macros.h" 9 #include "ui/gfx/geometry/point.h" 10 #include "ui/gfx/native_widget_types.h" 11 12 namespace ui { 13 class AXSystemCaretWin; 14 } 15 16 namespace views { 17 18 class DesktopWindowTreeHostWin; 19 class HWNDMessageHandler; 20 21 namespace test { 22 23 // A wrapper of DesktopWindowTreeHostWin to access private members for testing. 24 class DesktopWindowTreeHostWinTestApi { 25 public: 26 explicit DesktopWindowTreeHostWinTestApi(DesktopWindowTreeHostWin* host); 27 28 void EnsureAXSystemCaretCreated(); 29 ui::AXSystemCaretWin* GetAXSystemCaret(); 30 gfx::NativeViewAccessible GetNativeViewAccessible(); 31 32 HWNDMessageHandler* GetHwndMessageHandler(); 33 34 void SetMockCursorPositionForTesting(const gfx::Point& position); 35 36 private: 37 DesktopWindowTreeHostWin* host_; 38 39 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostWinTestApi); 40 }; 41 42 } // namespace test 43 } // namespace views 44 45 #endif // UI_VIEWS_TEST_DESKTOP_WINDOW_TREE_HOST_WIN_TEST_API_H_ 46