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) { | 175 if (notify_observer && desktop_bar_observer()) { |
176 FOR_EACH_OBSERVER( | 176 desktop_bar_observer()->OnAutoHidingDesktopBarVisibilityChanged( |
177 DesktopBarObserver, | 177 alignment, visibility); |
178 desktop_bar_observers(), | |
179 OnAutoHidingDesktopBarVisibilityChanged(alignment, visibility)); | |
180 } | 178 } |
181 } | 179 } |
182 } | 180 } |
183 | 181 |
184 if (thickness_changed) | 182 if (thickness_changed) |
185 OnAutoHidingDesktopBarChanged(); | 183 OnAutoHidingDesktopBarChanged(); |
186 | 184 |
187 return true; | 185 return true; |
188 } | 186 } |
189 | 187 |
190 // static | 188 // static |
191 DisplaySettingsProvider* DisplaySettingsProvider::Create() { | 189 DisplaySettingsProvider* DisplaySettingsProvider::Create() { |
192 return new DisplaySettingsProviderWin(); | 190 return new DisplaySettingsProviderWin(); |
193 } | 191 } |
OLD | NEW |