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

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

Issue 8549008: Extract MonitorInfoProvider from WindowSizer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 2 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
Index: chrome/browser/ui/window_sizer.h
diff --git a/chrome/browser/ui/window_sizer.h b/chrome/browser/ui/window_sizer.h
index 20fe2d163e6017adeb1d20a849d3703d279254df..516aaa345408daa3f9bbc2b2f98d7ff6ed5840f8 100644
--- a/chrome/browser/ui/window_sizer.h
+++ b/chrome/browser/ui/window_sizer.h
@@ -6,13 +6,12 @@
#define CHROME_BROWSER_UI_WINDOW_SIZER_H_
#pragma once
-#include <vector>
-
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "ui/gfx/rect.h"
class Browser;
+class MonitorInfoProvider;
///////////////////////////////////////////////////////////////////////////////
// WindowSizer
@@ -27,7 +26,6 @@ class Browser;
//
class WindowSizer {
public:
- class MonitorInfoProvider;
class StateProvider;
// The WindowSizer assumes ownership of these objects.
@@ -35,48 +33,6 @@ class WindowSizer {
MonitorInfoProvider* monitor_info_provider);
virtual ~WindowSizer();
- // Static factory methods to create default MonitorInfoProvider
- // instances. The returned object is owned by the caller.
- static MonitorInfoProvider* CreateDefaultMonitorInfoProvider();
-
- // An interface implemented by an object that can retrieve information about
- // the monitors on the system.
- class MonitorInfoProvider {
- public:
- MonitorInfoProvider() {}
- virtual ~MonitorInfoProvider() {}
-
- // Returns the bounds of the work area of the primary monitor.
- virtual gfx::Rect GetPrimaryMonitorWorkArea() const = 0;
-
- // Returns the bounds of the primary monitor.
- virtual gfx::Rect GetPrimaryMonitorBounds() 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;
-
- // Ensures number and coordinates of work areas are up-to-date. You must
- // call this before calling either of the below functions, as work areas can
- // change while the program is running.
- virtual void UpdateWorkAreas() = 0;
-
- // Returns the number of monitors on the system.
- size_t GetMonitorCount() const {
- return work_areas_.size();
- }
-
- // Returns the bounds of the work area of the monitor at the specified
- // index.
- gfx::Rect GetWorkAreaAt(size_t index) const {
- return work_areas_[index];
- }
-
- protected:
- std::vector<gfx::Rect> work_areas_;
- };
-
// An interface implemented by an object that can retrieve state from either a
// persistent store or an existing window.
class StateProvider {

Powered by Google App Engine
This is Rietveld 408576698