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 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 gfx::Rect new_work_area = gfx::Screen::GetPrimaryDisplay().work_area(); |
468 #endif | 468 #endif |
469 if (!work_area_.Equals(new_work_area)) { | 469 if (work_area_ != new_work_area) { |
470 work_area_.SetRect(new_work_area.x(), new_work_area.y(), | 470 work_area_.SetRect(new_work_area.x(), new_work_area.y(), |
471 new_work_area.width(), new_work_area.height()); | 471 new_work_area.width(), new_work_area.height()); |
472 changed = true; | 472 changed = true; |
473 } | 473 } |
474 | 474 |
475 return changed; | 475 return changed; |
476 } | 476 } |
OLD | NEW |