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

Unified Diff: chrome/browser/ui/window_sizer/window_sizer.h

Issue 22888006: Use gfx::Screen to provide display information in WindowSizer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 4 months 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/window_sizer/window_sizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/window_sizer/window_sizer.h
diff --git a/chrome/browser/ui/window_sizer/window_sizer.h b/chrome/browser/ui/window_sizer/window_sizer.h
index 391bdbc319512d99970665432b67adb8d36f15ea..7648104460dff4c2d54f07d597c5b8f3d7b531c3 100644
--- a/chrome/browser/ui/window_sizer/window_sizer.h
+++ b/chrome/browser/ui/window_sizer/window_sizer.h
@@ -13,23 +13,9 @@
class Browser;
-// An interface implemented by an object that can retrieve information about
-// the monitors on the system.
-class MonitorInfoProvider {
- public:
- virtual ~MonitorInfoProvider() {}
-
- // Returns the bounds of the work area of the primary monitor.
- virtual gfx::Rect GetPrimaryDisplayWorkArea() const = 0;
-
- // Returns the bounds of the primary monitor.
- virtual gfx::Rect GetPrimaryDisplayBounds() const = 0;
-
- // Returns the bounds of the work area of the monitor that most closely
- // intersects the provided bounds.
- virtual gfx::Rect GetMonitorWorkAreaMatching(
- const gfx::Rect& match_rect) const = 0;
-};
+namespace gfx {
+class Screen;
+}
///////////////////////////////////////////////////////////////////////////////
// WindowSizer
@@ -50,10 +36,10 @@ class WindowSizer {
// MonitorInfoProvider using the physical screen.
WindowSizer(StateProvider* state_provider, const Browser* browser);
- // WindowSizer owns |state_provider| and |monitor_info_provider|.
- // It will use the supplied monitor info provider. Used only for testing.
+ // WindowSizer owns |state_provider| and will use the supplied |screen|.
+ // Used only for testing.
WindowSizer(StateProvider* state_provider,
- MonitorInfoProvider* monitor_info_provider,
+ gfx::Screen* screen,
const Browser* browser);
virtual ~WindowSizer();
@@ -185,7 +171,7 @@ class WindowSizer {
// Providers for persistent storage and monitor metrics.
scoped_ptr<StateProvider> state_provider_;
- scoped_ptr<MonitorInfoProvider> monitor_info_provider_;
+ gfx::Screen* screen_; // not owned.
// Note that this browser handle might be NULL.
const Browser* browser_;
« no previous file with comments | « no previous file | chrome/browser/ui/window_sizer/window_sizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698