summaryrefslogtreecommitdiffstats
path: root/ui/aura/root_window_transformer.h
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-03 08:10:55 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-03 08:10:55 +0000
commit84654d6149de9aae55c02ddd5679f1e0d39266e9 (patch)
tree6b0806495d1bfd448eaed26a7a75c4310c78d4d3 /ui/aura/root_window_transformer.h
parent7c4cd75adc8520595e620200ba339d61bc9a2a35 (diff)
downloadchromium_src-84654d6149de9aae55c02ddd5679f1e0d39266e9.zip
chromium_src-84654d6149de9aae55c02ddd5679f1e0d39266e9.tar.gz
chromium_src-84654d6149de9aae55c02ddd5679f1e0d39266e9.tar.bz2
Factor out ash/chromeos specific transform from RootWindow.
This also allows screen magnifier to use the same mechanism as screen rotation/zooming. BUG=223983 TEST=no functional change. All tests should pass. Review URL: https://chromiumcodereview.appspot.com/13429003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192019 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura/root_window_transformer.h')
-rw-r--r--ui/aura/root_window_transformer.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/ui/aura/root_window_transformer.h b/ui/aura/root_window_transformer.h
new file mode 100644
index 0000000..89d67f2
--- /dev/null
+++ b/ui/aura/root_window_transformer.h
@@ -0,0 +1,45 @@
+// Copyright (c) 2013 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_ROOT_WINDOW_TRANSFORMER_H_
+#define UI_AURA_ROOT_WINDOW_TRANSFORMER_H_
+
+#include "ui/aura/aura_export.h"
+
+namespace gfx {
+class Insets;
+class Rect;
+class Size;
+class Transform;
+}
+
+namespace aura {
+
+// RootWindowTransformer controls how RootWindow should be placed and
+// transformed inside the host window.
+class AURA_EXPORT RootWindowTransformer {
+ public:
+ virtual ~RootWindowTransformer() {}
+
+ // Returns the transform the root window in DIP.
+ virtual gfx::Transform GetTransform() const = 0;
+
+ // Returns the inverse of the transform above. This method is to
+ // provie an accurate inverse of the transform because the result of
+ // |gfx::Transform::GetInverse| may contains computational error.
+ virtual gfx::Transform GetInverseTransform() const = 0;
+
+ // Returns the root window's bounds for given host window size in DIP.
+ // This is necessary to handle the case where the root window's size
+ // is bigger than the host window. (Screen magnifier for example).
+ virtual gfx::Rect GetRootWindowBounds(const gfx::Size& host_size) const = 0;
+
+ // Returns the insets that specifies the effective area of
+ // the host window.
+ virtual gfx::Insets GetHostInsets() const = 0;
+};
+
+} // namespace aura
+
+#endif // UI_AURA_ROOT_WINDOW_TRANSFORMER_H_