| OLD | NEW |
| (Empty) |
| 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. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_PANELS_TEST_PANEL_ACTIVE_STATE_OBSERVER_H_ | |
| 6 #define CHROME_BROWSER_UI_PANELS_TEST_PANEL_ACTIVE_STATE_OBSERVER_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "chrome/browser/ui/panels/test_panel_notification_observer.h" | |
| 10 | |
| 11 class Panel; | |
| 12 | |
| 13 // Custom notification observer for waiting on panel active state. | |
| 14 // Modeled after ui_test_utils notification observers. | |
| 15 class PanelActiveStateObserver : public TestPanelNotificationObserver { | |
| 16 public: | |
| 17 // Register to listen for panel active state change notifications | |
| 18 // for the specified panel to detect a change to the expected active | |
| 19 // state. | |
| 20 PanelActiveStateObserver(Panel* panel, bool expect_active); | |
| 21 ~PanelActiveStateObserver() override; | |
| 22 | |
| 23 private: | |
| 24 // TestNotificationObserver override: | |
| 25 bool AtExpectedState() override; | |
| 26 | |
| 27 Panel* panel_; | |
| 28 bool expect_active_; | |
| 29 | |
| 30 DISALLOW_COPY_AND_ASSIGN(PanelActiveStateObserver); | |
| 31 }; | |
| 32 | |
| 33 #endif // CHROME_BROWSER_UI_PANELS_TEST_PANEL_ACTIVE_STATE_OBSERVER_H_ | |
| OLD | NEW |