| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_MOUSE_WATCHER_H_ | 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_MOUSE_WATCHER_H_ |
| 6 #define CHROME_BROWSER_UI_PANELS_PANEL_MOUSE_WATCHER_H_ | 6 #define CHROME_BROWSER_UI_PANELS_PANEL_MOUSE_WATCHER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
| 10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 // |mouse_position| is in screen coordinates. | 35 // |mouse_position| is in screen coordinates. |
| 36 void NotifyMouseMovement(const gfx::Point& mouse_position); | 36 void NotifyMouseMovement(const gfx::Point& mouse_position); |
| 37 | 37 |
| 38 // Returns true if watching mouse movements. | 38 // Returns true if watching mouse movements. |
| 39 virtual bool IsActive() const = 0; | 39 virtual bool IsActive() const = 0; |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 friend class PanelMouseWatcherTest; | 42 friend class PanelMouseWatcherTest; |
| 43 FRIEND_TEST_ALL_PREFIXES(PanelMouseWatcherTest, StartStopWatching); | 43 FRIEND_TEST_ALL_PREFIXES(PanelMouseWatcherTest, StartStopWatching); |
| 44 friend class PanelBrowserTest; |
| 44 | 45 |
| 45 // Start/stop tracking mouse movements. | 46 // Start/stop tracking mouse movements. |
| 46 virtual void Start() = 0; | 47 virtual void Start() = 0; |
| 47 virtual void Stop() = 0; | 48 virtual void Stop() = 0; |
| 48 | 49 |
| 49 ObserverList<PanelMouseWatcherObserver> observers_; | 50 ObserverList<PanelMouseWatcherObserver> observers_; |
| 50 }; | 51 }; |
| 51 | 52 |
| 52 #endif // CHROME_BROWSER_UI_PANELS_PANEL_MOUSE_WATCHER_H_ | 53 #endif // CHROME_BROWSER_UI_PANELS_PANEL_MOUSE_WATCHER_H_ |
| OLD | NEW |