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

Unified Diff: ui/views/test/widget_test.h

Issue 2871073002: cros: Bind hangup red button on remote controller to close web dialog (Closed)
Patch Set: nits Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/webview/web_dialog_view.cc ('k') | ui/views/test/widget_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/test/widget_test.h
diff --git a/ui/views/test/widget_test.h b/ui/views/test/widget_test.h
index a796a26f3c9a5bb9fb777d8c254fa2853de9e5c2..3c956cd5be63e228f3f9656fe23df833c57197db 100644
--- a/ui/views/test/widget_test.h
+++ b/ui/views/test/widget_test.h
@@ -184,6 +184,10 @@ class WidgetClosingObserver : public WidgetObserver {
explicit WidgetClosingObserver(Widget* widget);
~WidgetClosingObserver() override;
+ // Returns immediately when |widget_| becomes NULL, otherwise a RunLoop is
+ // used until widget closing event is received.
+ void Wait();
+
bool widget_closed() const { return !widget_; }
private:
@@ -191,6 +195,7 @@ class WidgetClosingObserver : public WidgetObserver {
void OnWidgetClosing(Widget* widget) override;
Widget* widget_;
+ base::RunLoop run_loop_;
DISALLOW_COPY_AND_ASSIGN(WidgetClosingObserver);
};
« no previous file with comments | « ui/views/controls/webview/web_dialog_view.cc ('k') | ui/views/test/widget_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698