OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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 COMPONENTS_UI_ZOOM_ZOOM_TEST_UTILS_H_ |
| 6 #define COMPONENTS_UI_ZOOM_ZOOM_TEST_UTILS_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "components/ui/zoom/zoom_controller.h" |
| 10 #include "components/ui/zoom/zoom_observer.h" |
| 11 |
| 12 namespace content { |
| 13 class MessageLoopRunner; |
| 14 } |
| 15 |
| 16 namespace ui_zoom { |
| 17 |
| 18 bool operator==(const ZoomController::ZoomChangedEventData& lhs, |
| 19 const ZoomController::ZoomChangedEventData& rhs); |
| 20 |
| 21 class ZoomChangedWatcher : public ui_zoom::ZoomObserver { |
| 22 public: |
| 23 ZoomChangedWatcher( |
| 24 ZoomController* zoom_controller, |
| 25 const ZoomController::ZoomChangedEventData& expected_event_data); |
| 26 ~ZoomChangedWatcher() override; |
| 27 |
| 28 void Wait(); |
| 29 |
| 30 void OnZoomChanged( |
| 31 const ZoomController::ZoomChangedEventData& event_data) override; |
| 32 |
| 33 private: |
| 34 ZoomController* zoom_controller_; |
| 35 ZoomController::ZoomChangedEventData expected_event_data_; |
| 36 scoped_refptr<content::MessageLoopRunner> message_loop_runner_; |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(ZoomChangedWatcher); |
| 39 }; |
| 40 |
| 41 } // namespace ui_zoom |
| 42 #endif // COMPONENTS_UI_ZOOM_ZOOM_TEST_UTILS_H_ |
OLD | NEW |