1 // Copyright (c) 2012 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.
5 #ifndef UI_VIEWS_TEST_TEST_WIDGET_OBSERVER_H_
6 #define UI_VIEWS_TEST_TEST_WIDGET_OBSERVER_H_
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
12 #include "ui/views/widget/widget_observer.h"
17 // A Widget observer class used in the tests below to observe bubbles closing.
18 class TestWidgetObserver
: public WidgetObserver
{
20 explicit TestWidgetObserver(Widget
* widget
);
21 ~TestWidgetObserver() override
;
23 bool widget_closed() const { return widget_
== NULL
; }
26 // WidgetObserver overrides:
27 void OnWidgetDestroying(Widget
* widget
) override
;
31 DISALLOW_COPY_AND_ASSIGN(TestWidgetObserver
);
37 #endif // UI_VIEWS_TEST_TEST_WIDGET_OBSERVER_H_