Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(902)

Side by Side Diff: ui/views/test/widget_test.h

Issue 2660813002: Add WidgetTest::GetAllWidgets() to find dialogs created by TestBrowserDialog. (Closed)
Patch Set: respond to comments Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/views/BUILD.gn ('k') | ui/views/test/widget_test_aura.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // processor. 83 // processor.
84 static ui::EventProcessor* GetEventProcessor(Widget* widget); 84 static ui::EventProcessor* GetEventProcessor(Widget* widget);
85 85
86 // Get the InputMethodDelegate, for setting on a Mock InputMethod in tests. 86 // Get the InputMethodDelegate, for setting on a Mock InputMethod in tests.
87 static ui::internal::InputMethodDelegate* GetInputMethodDelegateForWidget( 87 static ui::internal::InputMethodDelegate* GetInputMethodDelegateForWidget(
88 Widget* widget); 88 Widget* widget);
89 89
90 // Return true if |window| is transparent according to the native platform. 90 // Return true if |window| is transparent according to the native platform.
91 static bool IsNativeWindowTransparent(gfx::NativeWindow window); 91 static bool IsNativeWindowTransparent(gfx::NativeWindow window);
92 92
93 // Returns the set of all Widgets that currently have a NativeWindow.
94 static Widget::Widgets GetAllWidgets();
95
93 private: 96 private:
94 DISALLOW_COPY_AND_ASSIGN(WidgetTest); 97 DISALLOW_COPY_AND_ASSIGN(WidgetTest);
95 }; 98 };
96 99
97 // A helper WidgetDelegate for tests that require hooks into WidgetDelegate 100 // A helper WidgetDelegate for tests that require hooks into WidgetDelegate
98 // calls, and removes some of the boilerplate for initializing a Widget. Calls 101 // calls, and removes some of the boilerplate for initializing a Widget. Calls
99 // Widget::CloseNow() when destroyed if it hasn't already been done. 102 // Widget::CloseNow() when destroyed if it hasn't already been done.
100 class TestDesktopWidgetDelegate : public WidgetDelegate { 103 class TestDesktopWidgetDelegate : public WidgetDelegate {
101 public: 104 public:
102 TestDesktopWidgetDelegate(); 105 TestDesktopWidgetDelegate();
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 bool observed_; 174 bool observed_;
172 bool active_; 175 bool active_;
173 176
174 DISALLOW_COPY_AND_ASSIGN(WidgetActivationWaiter); 177 DISALLOW_COPY_AND_ASSIGN(WidgetActivationWaiter);
175 }; 178 };
176 179
177 } // namespace test 180 } // namespace test
178 } // namespace views 181 } // namespace views
179 182
180 #endif // UI_VIEWS_TEST_WIDGET_TEST_H_ 183 #endif // UI_VIEWS_TEST_WIDGET_TEST_H_
OLDNEW
« no previous file with comments | « ui/views/BUILD.gn ('k') | ui/views/test/widget_test_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698