Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7751)

Unified Diff: chrome/browser/notifications/balloon_collection_impl.cc

Issue 8872044: Add test cases for panel overflow handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Final patch to land Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/panels/base_panel_browser_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/notifications/balloon_collection_impl.cc
diff --git a/chrome/browser/notifications/balloon_collection_impl.cc b/chrome/browser/notifications/balloon_collection_impl.cc
index 7494c7ecbe2df03890ca05c80674f7873d6c9840..29ee1bc4d252f1a29111d26dd99502c3b45ced5c 100644
--- a/chrome/browser/notifications/balloon_collection_impl.cc
+++ b/chrome/browser/notifications/balloon_collection_impl.cc
@@ -13,6 +13,7 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/panels/panel.h"
#include "chrome/browser/ui/panels/panel_manager.h"
+#include "chrome/browser/ui/panels/panel_strip.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_service.h"
@@ -399,7 +400,8 @@ gfx::Size BalloonCollectionImpl::Layout::ConstrainToSizeLimits(
bool BalloonCollectionImpl::Layout::ComputeOffsetToMoveAbovePanels(
const gfx::Rect& panel_bounds) {
- const PanelManager::Panels& panels = PanelManager::GetInstance()->panels();
+ const PanelStrip::Panels& panels =
+ PanelManager::GetInstance()->panel_strip()->panels();
int offset_to_move_above_panels = 0;
// The offset is the maximum height of panels that could overlap with the
@@ -413,7 +415,7 @@ bool BalloonCollectionImpl::Layout::ComputeOffsetToMoveAbovePanels(
return false;
}
- for (PanelManager::Panels::const_reverse_iterator iter = panels.rbegin();
+ for (PanelStrip::Panels::const_reverse_iterator iter = panels.rbegin();
iter != panels.rend(); ++iter) {
// No need to check panels beyond the area occupied by the balloons.
if ((*iter)->GetBounds().x() >= work_area_.x() + max_balloon_width())
@@ -432,7 +434,7 @@ bool BalloonCollectionImpl::Layout::ComputeOffsetToMoveAbovePanels(
return false;
}
- for (PanelManager::Panels::const_iterator iter = panels.begin();
+ for (PanelStrip::Panels::const_iterator iter = panels.begin();
iter != panels.end(); ++iter) {
// No need to check panels beyond the area occupied by the balloons.
if ((*iter)->GetBounds().right() <=
« no previous file with comments | « no previous file | chrome/browser/ui/panels/base_panel_browser_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698