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 #include "chrome/browser/ui/panels/display_settings_provider_win.h" | 5 #include "chrome/browser/ui/panels/display_settings_provider_win.h" |
6 | 6 |
7 #include <shellapi.h> | 7 #include <shellapi.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "ui/views/widget/monitor_win.h" | 10 #include "ui/views/widget/monitor_win.h" |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 if (thickness != taskbars_[i].thickness) { | 165 if (thickness != taskbars_[i].thickness) { |
166 taskbars_[i].thickness = thickness; | 166 taskbars_[i].thickness = thickness; |
167 thickness_changed = true; | 167 thickness_changed = true; |
168 } | 168 } |
169 | 169 |
170 // Check and notify the visibility change. | 170 // Check and notify the visibility change. |
171 DesktopBarVisibility visibility = GetDesktopBarVisibilityFromBounds( | 171 DesktopBarVisibility visibility = GetDesktopBarVisibilityFromBounds( |
172 alignment, bounds); | 172 alignment, bounds); |
173 if (visibility != taskbars_[i].visibility) { | 173 if (visibility != taskbars_[i].visibility) { |
174 taskbars_[i].visibility = visibility; | 174 taskbars_[i].visibility = visibility; |
175 if (notify_observer && desktop_bar_observer()) { | 175 if (notify_observer) { |
176 desktop_bar_observer()->OnAutoHidingDesktopBarVisibilityChanged( | 176 FOR_EACH_OBSERVER( |
177 alignment, visibility); | 177 DesktopBarObserver, |
| 178 desktop_bar_observers(), |
| 179 OnAutoHidingDesktopBarVisibilityChanged(alignment, visibility)); |
178 } | 180 } |
179 } | 181 } |
180 } | 182 } |
181 | 183 |
182 if (thickness_changed) | 184 if (thickness_changed) |
183 OnAutoHidingDesktopBarChanged(); | 185 OnAutoHidingDesktopBarChanged(); |
184 | 186 |
185 return true; | 187 return true; |
186 } | 188 } |
187 | 189 |
188 // static | 190 // static |
189 DisplaySettingsProvider* DisplaySettingsProvider::Create() { | 191 DisplaySettingsProvider* DisplaySettingsProvider::Create() { |
190 return new DisplaySettingsProviderWin(); | 192 return new DisplaySettingsProviderWin(); |
191 } | 193 } |
OLD | NEW |