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

Unified Diff: ui/aura/monitor.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.h
diff --git a/ui/aura/monitor.h b/ui/aura/monitor.h
new file mode 100644
index 0000000000000000000000000000000000000000..a485b2bf88846118b58b12156a3d757fe98c092a
--- /dev/null
+++ b/ui/aura/monitor.h
@@ -0,0 +1,48 @@
+// 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_H_
+#define UI_AURA_MONITOR_H_
+#pragma once
+
+#include "base/basictypes.h"
+#include "ui/aura/aura_export.h"
+#include "ui/gfx/insets.h"
+#include "ui/gfx/rect.h"
+
+namespace aura {
+
+class AURA_EXPORT Monitor {
+ public:
+ Monitor();
+
+ // Sets/gets monitor's bounds in |gfx::screen|'s coordinates,
+ // which is relative to the primary screen's origin.
+ void set_bounds(gfx::Rect& bounds) { bounds_ = bounds;}
+ const gfx::Rect& bounds() const { return bounds_; };
+
+ // Sets/gets monitor's workarea insets.
+ void set_work_area_insets(const gfx::Insets& insets) {
+ work_area_insets_ = insets;
+ }
+ const gfx::Insets& work_area_insets() const { return work_area_insets_; }
+
+ // Returns the monitor's size.
+ const gfx::Size& size() const { return bounds_.size(); }
+
+ // Returns the monitor's work area.
+ gfx::Rect GetWorkAreaBounds() const;
+
+ private:
+ // Insets for the work area.
+ gfx::Insets work_area_insets_;
+
+ gfx::Rect bounds_;
+
+ DISALLOW_COPY_AND_ASSIGN(Monitor);
+};
+
+} // namespace aura
+
+#endif // UI_AURA_MONITOR_H_

Powered by Google App Engine
This is Rietveld 408576698