| 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.h" | 5 #include "chrome/browser/ui/panels/display_settings_provider.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chrome/browser/fullscreen.h" | 8 #include "chrome/browser/fullscreen.h" |
| 9 #include "ui/gfx/screen.h" | 9 #include "ui/gfx/screen.h" |
| 10 | 10 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 if (adjusted_work_area_.IsEmpty()) | 65 if (adjusted_work_area_.IsEmpty()) |
| 66 OnDisplaySettingsChanged(); | 66 OnDisplaySettingsChanged(); |
| 67 | 67 |
| 68 return adjusted_work_area_; | 68 return adjusted_work_area_; |
| 69 } | 69 } |
| 70 | 70 |
| 71 gfx::Rect DisplaySettingsProvider::GetWorkArea() const { | 71 gfx::Rect DisplaySettingsProvider::GetWorkArea() const { |
| 72 #if defined(OS_MACOSX) | 72 #if defined(OS_MACOSX) |
| 73 // On OSX, panels should be dropped all the way to the bottom edge of the | 73 // On OSX, panels should be dropped all the way to the bottom edge of the |
| 74 // screen (and overlap Dock). | 74 // screen (and overlap Dock). |
| 75 gfx::Rect work_area = gfx::Screen::GetPrimaryMonitorBounds(); | 75 gfx::Rect work_area = gfx::Screen::GetPrimaryMonitor().bounds(); |
| 76 #else | 76 #else |
| 77 gfx::Rect work_area = gfx::Screen::GetPrimaryMonitorWorkArea(); | 77 gfx::Rect work_area = gfx::Screen::GetPrimaryMonitor().work_area(); |
| 78 #endif | 78 #endif |
| 79 return work_area; | 79 return work_area; |
| 80 } | 80 } |
| 81 | 81 |
| 82 void DisplaySettingsProvider::OnDisplaySettingsChanged() { | 82 void DisplaySettingsProvider::OnDisplaySettingsChanged() { |
| 83 gfx::Rect work_area = GetWorkArea(); | 83 gfx::Rect work_area = GetWorkArea(); |
| 84 if (work_area == work_area_) | 84 if (work_area == work_area_) |
| 85 return; | 85 return; |
| 86 work_area_ = work_area; | 86 work_area_ = work_area; |
| 87 | 87 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 full_screen_observers_, | 145 full_screen_observers_, |
| 146 OnFullScreenModeChanged(is_full_screen_)); | 146 OnFullScreenModeChanged(is_full_screen_)); |
| 147 } | 147 } |
| 148 | 148 |
| 149 #if defined(USE_AURA) | 149 #if defined(USE_AURA) |
| 150 // static | 150 // static |
| 151 DisplaySettingsProvider* DisplaySettingsProvider::Create() { | 151 DisplaySettingsProvider* DisplaySettingsProvider::Create() { |
| 152 return new DisplaySettingsProvider(); | 152 return new DisplaySettingsProvider(); |
| 153 } | 153 } |
| 154 #endif | 154 #endif |
| OLD | NEW |