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

Unified Diff: ui/aura/monitor.h

Issue 9960042: Refactor screen/monitor so that gfx::Screen returns monitor object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 8 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 | « ui/aura/aura.gyp ('k') | ui/aura/monitor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/monitor.h
diff --git a/ui/aura/monitor.h b/ui/aura/monitor.h
deleted file mode 100644
index f62a7810f9f99c58b6bd850f3de9a3212da1d23f..0000000000000000000000000000000000000000
--- a/ui/aura/monitor.h
+++ /dev/null
@@ -1,72 +0,0 @@
-// 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 {
-
-// Note: The screen and monitor currently uses pixels coordinate
-// system. ENABLE_DIP macro (which is enabled with enable_dip=1 gyp
-// flag) will make this inconsistent with views' coordinate system
-// because views will use DIP coordinate system, which uses
-// (1.0/device_scale_factor) scale of the pixel coordinate system.
-// TODO(oshima): Change aura/screen to DIP coordinate system and
-// update this comment.
-class AURA_EXPORT Monitor {
- public:
- Monitor();
- ~Monitor();
-
- // Sets/gets monitor's bounds in |gfx::screen|'s coordinates,
- // which is relative to the primary screen's origin.
- void set_bounds(const gfx::Rect& bounds) { bounds_ = bounds;}
- const gfx::Rect& bounds() const { return bounds_; };
-
- // Sets/gets monitor's size.
- void set_size(const gfx::Size& size) { bounds_.set_size(size); }
- const gfx::Size& size() const { return bounds_.size(); }
-
- // 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_; }
-
- // Output device's pixel scale factor. This specifies how much the
- // UI should be scaled when the actual output has more pixels than
- // standard monitors (which is around 100~120dpi.) For aura, this
- // value is either 1.0 or 2.0, but may return different values on
- // other platforms.
- float GetDeviceScaleFactor() const {
- return device_scale_factor_;
- }
-
- void set_device_scale_factor(float scale) {
- device_scale_factor_ = scale;
- }
-
- // Returns the monitor's work area.
- gfx::Rect GetWorkAreaBounds() const;
-
- private:
- // Insets for the work area.
- gfx::Insets work_area_insets_;
-
- gfx::Rect bounds_;
-
- float device_scale_factor_;
-
- DISALLOW_COPY_AND_ASSIGN(Monitor);
-};
-
-} // namespace aura
-
-#endif // UI_AURA_MONITOR_H_
« no previous file with comments | « ui/aura/aura.gyp ('k') | ui/aura/monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698