| 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 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 offset_to_move_above_panels_ = offset_to_move_above_panels; | 479 offset_to_move_above_panels_ = offset_to_move_above_panels; |
| 480 return true; | 480 return true; |
| 481 } | 481 } |
| 482 | 482 |
| 483 bool BalloonCollectionImpl::Layout::RefreshSystemMetrics() { | 483 bool BalloonCollectionImpl::Layout::RefreshSystemMetrics() { |
| 484 bool changed = false; | 484 bool changed = false; |
| 485 | 485 |
| 486 #if defined(OS_MACOSX) | 486 #if defined(OS_MACOSX) |
| 487 gfx::Rect new_work_area = GetMacWorkArea(); | 487 gfx::Rect new_work_area = GetMacWorkArea(); |
| 488 #else | 488 #else |
| 489 gfx::Rect new_work_area = gfx::Screen::GetPrimaryMonitorWorkArea(); | 489 gfx::Rect new_work_area = gfx::Screen::GetPrimaryMonitor().work_area(); |
| 490 #endif | 490 #endif |
| 491 if (!work_area_.Equals(new_work_area)) { | 491 if (!work_area_.Equals(new_work_area)) { |
| 492 work_area_.SetRect(new_work_area.x(), new_work_area.y(), | 492 work_area_.SetRect(new_work_area.x(), new_work_area.y(), |
| 493 new_work_area.width(), new_work_area.height()); | 493 new_work_area.width(), new_work_area.height()); |
| 494 changed = true; | 494 changed = true; |
| 495 } | 495 } |
| 496 | 496 |
| 497 return changed; | 497 return changed; |
| 498 } | 498 } |
| OLD | NEW |