OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_DISPLAY_SETTINGS_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_UI_PANELS_DISPLAY_SETTINGS_PROVIDER_H_ |
6 #define CHROME_BROWSER_UI_PANELS_DISPLAY_SETTINGS_PROVIDER_H_ | 6 #define CHROME_BROWSER_UI_PANELS_DISPLAY_SETTINGS_PROVIDER_H_ |
7 | 7 |
8 #include "base/observer_list.h" | 8 #include "base/observer_list.h" |
9 #include "base/timer.h" | 9 #include "base/timer.h" |
10 #include "ui/gfx/rect.h" | 10 #include "ui/gfx/rect.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 // Indicates current visibility state of the desktop bar. | 26 // Indicates current visibility state of the desktop bar. |
27 enum DesktopBarVisibility { | 27 enum DesktopBarVisibility { |
28 DESKTOP_BAR_VISIBLE, | 28 DESKTOP_BAR_VISIBLE, |
29 DESKTOP_BAR_ANIMATING, | 29 DESKTOP_BAR_ANIMATING, |
30 DESKTOP_BAR_HIDDEN | 30 DESKTOP_BAR_HIDDEN |
31 }; | 31 }; |
32 | 32 |
33 class DisplayAreaObserver { | 33 class DisplayAreaObserver { |
34 public: | 34 public: |
| 35 virtual ~DisplayAreaObserver() { } |
| 36 |
35 virtual void OnDisplayAreaChanged(const gfx::Rect& display_area) = 0; | 37 virtual void OnDisplayAreaChanged(const gfx::Rect& display_area) = 0; |
36 }; | 38 }; |
37 | 39 |
38 class DesktopBarObserver { | 40 class DesktopBarObserver { |
39 public: | 41 public: |
| 42 virtual ~DesktopBarObserver() { } |
| 43 |
40 virtual void OnAutoHidingDesktopBarVisibilityChanged( | 44 virtual void OnAutoHidingDesktopBarVisibilityChanged( |
41 DesktopBarAlignment alignment, DesktopBarVisibility visibility) = 0; | 45 DesktopBarAlignment alignment, DesktopBarVisibility visibility) = 0; |
42 }; | 46 }; |
43 | 47 |
44 class FullScreenObserver { | 48 class FullScreenObserver { |
45 public: | 49 public: |
| 50 virtual ~FullScreenObserver() { } |
| 51 |
46 virtual void OnFullScreenModeChanged(bool is_full_screen) = 0; | 52 virtual void OnFullScreenModeChanged(bool is_full_screen) = 0; |
47 }; | 53 }; |
48 | 54 |
49 static DisplaySettingsProvider* Create(); | 55 static DisplaySettingsProvider* Create(); |
50 | 56 |
51 virtual ~DisplaySettingsProvider(); | 57 virtual ~DisplaySettingsProvider(); |
52 | 58 |
53 // Subscribes/unsubscribes from the display settings change notification. | 59 // Subscribes/unsubscribes from the display settings change notification. |
54 void AddDisplayAreaObserver(DisplayAreaObserver* observer); | 60 void AddDisplayAreaObserver(DisplayAreaObserver* observer); |
55 void RemoveDisplayAreaObserver(DisplayAreaObserver* observer); | 61 void RemoveDisplayAreaObserver(DisplayAreaObserver* observer); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 // True if full screen mode or presentation mode is entered. | 163 // True if full screen mode or presentation mode is entered. |
158 bool is_full_screen_; | 164 bool is_full_screen_; |
159 | 165 |
160 // Timer used to detect full-screen mode change. | 166 // Timer used to detect full-screen mode change. |
161 base::RepeatingTimer<DisplaySettingsProvider> full_screen_mode_timer_; | 167 base::RepeatingTimer<DisplaySettingsProvider> full_screen_mode_timer_; |
162 | 168 |
163 DISALLOW_COPY_AND_ASSIGN(DisplaySettingsProvider); | 169 DISALLOW_COPY_AND_ASSIGN(DisplaySettingsProvider); |
164 }; | 170 }; |
165 | 171 |
166 #endif // CHROME_BROWSER_UI_PANELS_DISPLAY_SETTINGS_PROVIDER_H_ | 172 #endif // CHROME_BROWSER_UI_PANELS_DISPLAY_SETTINGS_PROVIDER_H_ |
OLD | NEW |