Chromium Code Reviews| Index: ui/aura/monitor.h |
| diff --git a/ui/aura/monitor.h b/ui/aura/monitor.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2a958b428f40757013ec03ac32fbca540397f1e8 |
| --- /dev/null |
| +++ b/ui/aura/monitor.h |
| @@ -0,0 +1,47 @@ |
| +// 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(); |
| + |
| + // Set/gets monitor's bounds in screen's coordinates. |
|
Ben Goodger (Google)
2012/03/13 19:28:12
what does it mean to set the monitor's bounds in s
oshima
2012/03/13 20:06:37
By screen, I meant the coordinate system used by "
|
| + void set_bounds(gfx::Rect& bounds) { bounds_ = bounds;} |
| + const gfx::Rect& bounds() const { return bounds_; }; |
| + |
| + // Set/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_ |