| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_VIEWS_TEST_WIDGET_TEST_H_ | 5 #ifndef UI_VIEWS_TEST_WIDGET_TEST_H_ |
| 6 #define UI_VIEWS_TEST_WIDGET_TEST_H_ | 6 #define UI_VIEWS_TEST_WIDGET_TEST_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 | 144 |
| 145 private: | 145 private: |
| 146 Widget* widget_; | 146 Widget* widget_; |
| 147 View* contents_view_ = nullptr; | 147 View* contents_view_ = nullptr; |
| 148 int window_closing_count_ = 0; | 148 int window_closing_count_ = 0; |
| 149 gfx::Rect initial_bounds_ = gfx::Rect(100, 100, 200, 200); | 149 gfx::Rect initial_bounds_ = gfx::Rect(100, 100, 200, 200); |
| 150 | 150 |
| 151 DISALLOW_COPY_AND_ASSIGN(TestDesktopWidgetDelegate); | 151 DISALLOW_COPY_AND_ASSIGN(TestDesktopWidgetDelegate); |
| 152 }; | 152 }; |
| 153 | 153 |
| 154 // Testing widget delegate that creates a widget with a single view, which is |
| 155 // the initially focused view. |
| 156 class TestInitialFocusWidgetDelegate : public TestDesktopWidgetDelegate { |
| 157 public: |
| 158 explicit TestInitialFocusWidgetDelegate(gfx::NativeWindow context); |
| 159 ~TestInitialFocusWidgetDelegate() override; |
| 160 |
| 161 View* view() { return view_; } |
| 162 |
| 163 // WidgetDelegate override: |
| 164 View* GetInitiallyFocusedView() override; |
| 165 |
| 166 private: |
| 167 View* view_; |
| 168 |
| 169 DISALLOW_COPY_AND_ASSIGN(TestInitialFocusWidgetDelegate); |
| 170 }; |
| 171 |
| 154 } // namespace test | 172 } // namespace test |
| 155 } // namespace views | 173 } // namespace views |
| 156 | 174 |
| 157 #endif // UI_VIEWS_TEST_WIDGET_TEST_H_ | 175 #endif // UI_VIEWS_TEST_WIDGET_TEST_H_ |
| OLD | NEW |