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 | |
37 virtual void OnDisplayAreaChanged(const gfx::Rect& display_area) = 0; | 35 virtual void OnDisplayAreaChanged(const gfx::Rect& display_area) = 0; |
38 }; | 36 }; |
39 | 37 |
40 class DesktopBarObserver { | 38 class DesktopBarObserver { |
41 public: | 39 public: |
42 virtual ~DesktopBarObserver() { } | |
43 | |
44 virtual void OnAutoHidingDesktopBarVisibilityChanged( | 40 virtual void OnAutoHidingDesktopBarVisibilityChanged( |
45 DesktopBarAlignment alignment, DesktopBarVisibility visibility) = 0; | 41 DesktopBarAlignment alignment, DesktopBarVisibility visibility) = 0; |
46 }; | 42 }; |
47 | 43 |
48 class FullScreenObserver { | 44 class FullScreenObserver { |
49 public: | 45 public: |
50 virtual ~FullScreenObserver() { } | |
51 | |
52 virtual void OnFullScreenModeChanged(bool is_full_screen) = 0; | 46 virtual void OnFullScreenModeChanged(bool is_full_screen) = 0; |
53 }; | 47 }; |
54 | 48 |
55 static DisplaySettingsProvider* Create(); | 49 static DisplaySettingsProvider* Create(); |
56 | 50 |
57 virtual ~DisplaySettingsProvider(); | 51 virtual ~DisplaySettingsProvider(); |
58 | 52 |
59 // Subscribes/unsubscribes from the display settings change notification. | 53 // Subscribes/unsubscribes from the display settings change notification. |
60 void AddDisplayAreaObserver(DisplayAreaObserver* observer); | 54 void AddDisplayAreaObserver(DisplayAreaObserver* observer); |
61 void RemoveDisplayAreaObserver(DisplayAreaObserver* observer); | 55 void RemoveDisplayAreaObserver(DisplayAreaObserver* observer); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 // True if full screen mode or presentation mode is entered. | 157 // True if full screen mode or presentation mode is entered. |
164 bool is_full_screen_; | 158 bool is_full_screen_; |
165 | 159 |
166 // Timer used to detect full-screen mode change. | 160 // Timer used to detect full-screen mode change. |
167 base::RepeatingTimer<DisplaySettingsProvider> full_screen_mode_timer_; | 161 base::RepeatingTimer<DisplaySettingsProvider> full_screen_mode_timer_; |
168 | 162 |
169 DISALLOW_COPY_AND_ASSIGN(DisplaySettingsProvider); | 163 DISALLOW_COPY_AND_ASSIGN(DisplaySettingsProvider); |
170 }; | 164 }; |
171 | 165 |
172 #endif // CHROME_BROWSER_UI_PANELS_DISPLAY_SETTINGS_PROVIDER_H_ | 166 #endif // CHROME_BROWSER_UI_PANELS_DISPLAY_SETTINGS_PROVIDER_H_ |
OLD | NEW |