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_STRIP_SQUEEZE_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_UI_PANELS_TEST_PANEL_STRIP_SQUEEZE_OBSERVER_H_ |
| 7 |
| 8 #include "chrome/browser/ui/panels/test_panel_notification_observer.h" |
| 9 |
| 10 class DockedPanelStrip; |
| 11 class Panel; |
| 12 |
| 13 // Custom notification observer for waiting on panel strip that squeezes |
| 14 // its panels to reflect a certain state. |
| 15 // Modeled after ui_test_utils notification observers. |
| 16 class PanelStripSqueezeObserver : public TestPanelNotificationObserver { |
| 17 public: |
| 18 // Register to listen for panel strip updated notifications |
| 19 // from the specified strip to detect a change to the state |
| 20 // where the |active_panel| is at full width and all other |
| 21 // panels in the strip are squeezed. |
| 22 PanelStripSqueezeObserver(DockedPanelStrip* strip, Panel* active_panel); |
| 23 virtual ~PanelStripSqueezeObserver(); |
| 24 |
| 25 private: |
| 26 // TestNotificationObserver override: |
| 27 virtual bool AtExpectedState() OVERRIDE; |
| 28 |
| 29 bool IsSqueezed(Panel* panel); |
| 30 |
| 31 DockedPanelStrip* panel_strip_; |
| 32 Panel* active_panel_; |
| 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(PanelStripSqueezeObserver); |
| 35 }; |
| 36 |
| 37 #endif // CHROME_BROWSER_UI_PANELS_TEST_PANEL_STRIP_SQUEEZE_OBSERVER_H_ |
OLD | NEW |