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

Unified Diff: ui/aura/monitor_manager.h

Issue 9699013: MonitorManager to manage multiple monitors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 9 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
Index: ui/aura/monitor_manager.h
diff --git a/ui/aura/monitor_manager.h b/ui/aura/monitor_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..a6775f575683f0b7d17217f9c7d305b1c478bbd9
--- /dev/null
+++ b/ui/aura/monitor_manager.h
@@ -0,0 +1,50 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_AURA_MONITOR_MANAGER_H_
+#define UI_AURA_MONITOR_MANAGER_H_
+#pragma once
+
+#include <vector>
+
+#include "base/basictypes.h"
+#include "ui/aura/aura_export.h"
+#include "ui/gfx/insets.h"
+namespace gfx {
+class Point;
+}
+
+namespace aura {
+class Monitor;
+class RootWindow;
+class Window;
+
+class AURA_EXPORT MonitorManager {
+ public:
+ MonitorManager();
+ virtual ~MonitorManager();
+
+ // Returns the monitor object nearest given |window|.
+ virtual const Monitor* GetMonitorNearestWindow(
+ const Window* window) const = 0;
+ virtual Monitor* GetMonitorNearestWindow(const Window* window) = 0;
+ // Returns the monitor object nearest given |pint|.
+ virtual const Monitor* GetMonitorNearestPoint(
+ const gfx::Point& point) const = 0;
+ // Returns the monitor that is consiered "primary".
+ virtual const Monitor* GetPrimaryMonitor() const = 0;
+ virtual size_t GetNumMonitors() const = 0;
+
+ protected:
+ friend class RootWindow;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MonitorManager);
+};
+
+AURA_EXPORT MonitorManager* CreateSingleMonitorManager(RootWindow* root_window);
+
+} // namespace aura
+
+#endif // UI_AURA_MONITOR_MANAGER_H_

Powered by Google App Engine
This is Rietveld 408576698