Chromium Code Reviews| Index: ui/views/test/widget_test.h |
| diff --git a/ui/views/test/widget_test.h b/ui/views/test/widget_test.h |
| index 0eee5eeab5b7ee2c4b160dae4fd918bbd12ec553..2c1afc20ac6aaaec421a904be5f84eff3f6170d4 100644 |
| --- a/ui/views/test/widget_test.h |
| +++ b/ui/views/test/widget_test.h |
| @@ -151,6 +151,24 @@ class TestDesktopWidgetDelegate : public WidgetDelegate { |
| DISALLOW_COPY_AND_ASSIGN(TestDesktopWidgetDelegate); |
| }; |
| +// Testing widget delegate that creates a widget with a single view, which |
| +// should be initially focused. |
| +class TestInitialFocusWidgetDelegate : public TestDesktopWidgetDelegate { |
|
sky
2016/03/02 03:41:02
Why is this code in widget_tesT? AFAICT you don't
xdai1
2016/03/02 21:15:55
This class is also used by widget_interactive_uite
|
| + public: |
| + explicit TestInitialFocusWidgetDelegate(gfx::NativeWindow context); |
| + ~TestInitialFocusWidgetDelegate() override; |
| + |
| + View* view() { return view_; } |
| + |
| + // WidgetDelegate override: |
| + View* GetInitiallyFocusedView() override; |
| + |
| + private: |
| + View* view_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(TestInitialFocusWidgetDelegate); |
| +}; |
| + |
| } // namespace test |
| } // namespace views |