| 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/notifications/balloon_collection_impl.h" | 5 #include "chrome/browser/notifications/balloon_collection_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "chrome/browser/notifications/balloon.h" | 10 #include "chrome/browser/notifications/balloon.h" |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 offset_to_move_above_panels_ = offset_to_move_above_panels; | 457 offset_to_move_above_panels_ = offset_to_move_above_panels; |
| 458 return true; | 458 return true; |
| 459 } | 459 } |
| 460 | 460 |
| 461 bool BalloonCollectionImpl::Layout::RefreshSystemMetrics() { | 461 bool BalloonCollectionImpl::Layout::RefreshSystemMetrics() { |
| 462 bool changed = false; | 462 bool changed = false; |
| 463 | 463 |
| 464 #if defined(OS_MACOSX) | 464 #if defined(OS_MACOSX) |
| 465 gfx::Rect new_work_area = GetMacWorkArea(); | 465 gfx::Rect new_work_area = GetMacWorkArea(); |
| 466 #else | 466 #else |
| 467 gfx::Rect new_work_area = gfx::Screen::GetPrimaryDisplay().work_area(); | 467 // TODO(scottmg): NativeScreen is wrong. http://crbug.com/133312 |
| 468 gfx::Rect new_work_area = |
| 469 gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().work_area(); |
| 468 #endif | 470 #endif |
| 469 if (!work_area_.Equals(new_work_area)) { | 471 if (!work_area_.Equals(new_work_area)) { |
| 470 work_area_.SetRect(new_work_area.x(), new_work_area.y(), | 472 work_area_.SetRect(new_work_area.x(), new_work_area.y(), |
| 471 new_work_area.width(), new_work_area.height()); | 473 new_work_area.width(), new_work_area.height()); |
| 472 changed = true; | 474 changed = true; |
| 473 } | 475 } |
| 474 | 476 |
| 475 return changed; | 477 return changed; |
| 476 } | 478 } |
| OLD | NEW |