Chromium Code Reviews| Index: chrome/browser/ui/panels/panel_manager.h |
| diff --git a/chrome/browser/ui/panels/panel_manager.h b/chrome/browser/ui/panels/panel_manager.h |
| index b78cb9e9b3e9a96ab1ba555589c52f4c50652c42..7834bbc7df866be7d7b9ffcb05552e09c6fc6ab3 100644 |
| --- a/chrome/browser/ui/panels/panel_manager.h |
| +++ b/chrome/browser/ui/panels/panel_manager.h |
| @@ -15,13 +15,6 @@ |
| #include "chrome/browser/ui/panels/panel.h" |
| #include "ui/gfx/rect.h" |
| -// TODO(jennb): Clean up by removing functions below that cause this |
| -// to be required. |
| -#ifdef UNIT_TEST |
| -#include "chrome/browser/ui/panels/panel_strip.h" |
| -#include "chrome/browser/ui/panels/panel_mouse_watcher.h" |
| -#endif |
| - |
| class Browser; |
| class PanelMouseWatcher; |
| class PanelOverflowStrip; |
| @@ -75,7 +68,6 @@ class PanelManager : public AutoHidingDesktopBar::Observer { |
| BrowserWindow* GetNextBrowserWindowToActivate(Panel* panel) const; |
| int num_panels() const; |
| - bool is_dragging_panel() const; |
| int StartingRightPosition() const; |
| const Panels& panels() const; |
| @@ -96,36 +88,25 @@ class PanelManager : public AutoHidingDesktopBar::Observer { |
| return panel_overflow_strip_.get(); |
| } |
| -#ifdef UNIT_TEST |
| - static int horizontal_spacing() { return PanelStrip::horizontal_spacing(); } |
| - |
| - const gfx::Rect& work_area() const { |
| - return work_area_; |
| - } |
| + // Tests may want to use a mock panel mouse watcher. |
| + void SetMouseWatcher(PanelMouseWatcher* watcher); |
|
jianli
2011/12/07 22:13:26
Since this is used only for testing purpose, can y
jennb
2011/12/07 23:35:40
Moved to private and made tests friends of this cl
|
| +#ifdef UNIT_TEST |
| void set_auto_hiding_desktop_bar( |
| AutoHidingDesktopBar* auto_hiding_desktop_bar) { |
| auto_hiding_desktop_bar_ = auto_hiding_desktop_bar; |
| } |
| - void set_mouse_watcher(PanelMouseWatcher* watcher) { |
| - panel_mouse_watcher_.reset(watcher); |
| - } |
| - |
| void enable_auto_sizing(bool enabled) { |
| auto_sizing_enabled_ = enabled; |
| } |
| - void SetWorkAreaForTesting(const gfx::Rect& work_area) { |
| - SetWorkArea(work_area); |
| - } |
| - |
| - void remove_delays_for_testing() { |
| - panel_strip_->remove_delays_for_testing(); |
| + const gfx::Rect& work_area() const { |
| + return work_area_; |
| } |
| - int minimized_panel_count() { |
| - return panel_strip_->minimized_panel_count(); |
| + void SetWorkAreaForTesting(const gfx::Rect& work_area) { |
| + SetWorkArea(work_area); |
| } |
| #endif |