summaryrefslogtreecommitdiffstats
path: root/ash/display/screen_position_controller.h
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-18 16:40:06 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-18 16:40:06 +0000
commit8d625fbd16a1d20f5e34bd01b83b0402bd3b4c80 (patch)
tree4fd429027e6fe44e79e8395ae63d6542d7edf657 /ash/display/screen_position_controller.h
parent87cc09add3a1a9ef94aaec1865fc3aaa23720aaa (diff)
downloadchromium_src-8d625fbd16a1d20f5e34bd01b83b0402bd3b4c80.zip
chromium_src-8d625fbd16a1d20f5e34bd01b83b0402bd3b4c80.tar.gz
chromium_src-8d625fbd16a1d20f5e34bd01b83b0402bd3b4c80.tar.bz2
* Use Virtual Screen Coordinates in more places
- When setting widget bounds. - Workspace Manager - When resizing - Restore bounds * Refactored ScreenPositionClient to manage Screen coordinates for different configurations. * Renamed GetBounds/SetBounds methods to GetScreen/ParentBounds to make it clear that in which coordinates you're dealing with. * I used InScreen/InParent for RestoreBounds because RestoreParent/ScreenBounds sounds strange. Converted Linux/Aura to use ScreenPositionClient. BUG=123160 TEST=several tests are updated to match VSC. added screen_ash_unittests. I'll update rest of tests when this is enable by default. Review URL: https://chromiumcodereview.appspot.com/10696023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147250 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/display/screen_position_controller.h')
-rw-r--r--ash/display/screen_position_controller.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/ash/display/screen_position_controller.h b/ash/display/screen_position_controller.h
new file mode 100644
index 0000000..0d39480
--- /dev/null
+++ b/ash/display/screen_position_controller.h
@@ -0,0 +1,34 @@
+// 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 ASH_DISPLAY_SCREEN_POSITION_CONTROLLER_H_
+#define ASH_DISPLAY_SCREEN_POSITION_CONTROLLER_H_
+
+#include "base/basictypes.h"
+#include "ui/aura/client/screen_position_client.h"
+
+namespace ash {
+namespace internal {
+
+class ScreenPositionController : public aura::client::ScreenPositionClient {
+ public:
+ ScreenPositionController() {}
+ virtual ~ScreenPositionController() {}
+
+ // aura::client::ScreenPositionClient overrides:
+ virtual void ConvertPointToScreen(const aura::Window* window,
+ gfx::Point* point) OVERRIDE;
+ virtual void ConvertPointFromScreen(const aura::Window* window,
+ gfx::Point* point) OVERRIDE;
+ virtual void SetBounds(aura::Window* window,
+ const gfx::Rect& bounds) OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ScreenPositionController);
+};
+
+} // internal
+} // ash
+
+#endif // ASH_DISPLAY_SCREEN_POSITION_CONTROLLER_H_