| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/stl_util-inl.h" | 8 #include "base/stl_util-inl.h" |
| 9 #include "chrome/browser/notifications/balloon.h" | 9 #include "chrome/browser/notifications/balloon.h" |
| 10 #include "chrome/browser/notifications/balloon_host.h" | 10 #include "chrome/browser/notifications/balloon_host.h" |
| 11 #include "chrome/browser/notifications/notification.h" | 11 #include "chrome/browser/notifications/notification.h" |
| 12 #include "chrome/browser/window_sizer.h" | 12 #include "chrome/browser/ui/window_sizer.h" |
| 13 #include "gfx/rect.h" | 13 #include "gfx/rect.h" |
| 14 #include "gfx/size.h" | 14 #include "gfx/size.h" |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 // Portion of the screen allotted for notifications. When notification balloons | 18 // Portion of the screen allotted for notifications. When notification balloons |
| 19 // extend over this, no new notifications are shown until some are closed. | 19 // extend over this, no new notifications are shown until some are closed. |
| 20 const double kPercentBalloonFillFactor = 0.7; | 20 const double kPercentBalloonFillFactor = 0.7; |
| 21 | 21 |
| 22 // Allow at least this number of balloons on the screen. | 22 // Allow at least this number of balloons on the screen. |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 gfx::Rect new_work_area = info_provider->GetPrimaryMonitorWorkArea(); | 320 gfx::Rect new_work_area = info_provider->GetPrimaryMonitorWorkArea(); |
| 321 #endif | 321 #endif |
| 322 if (!work_area_.Equals(new_work_area)) { | 322 if (!work_area_.Equals(new_work_area)) { |
| 323 work_area_.SetRect(new_work_area.x(), new_work_area.y(), | 323 work_area_.SetRect(new_work_area.x(), new_work_area.y(), |
| 324 new_work_area.width(), new_work_area.height()); | 324 new_work_area.width(), new_work_area.height()); |
| 325 changed = true; | 325 changed = true; |
| 326 } | 326 } |
| 327 | 327 |
| 328 return changed; | 328 return changed; |
| 329 } | 329 } |
| OLD | NEW |