summaryrefslogtreecommitdiffstats
path: root/ash/host
diff options
context:
space:
mode:
authordnicoara@chromium.org <dnicoara@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-12 21:57:00 +0000
committerdnicoara@chromium.org <dnicoara@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-12 21:57:00 +0000
commit2cfce41ad55ec1d81bfcd1ad56f5da2f13428665 (patch)
tree0aa10fbd74a5ef847d3ed203e9ffb05866cec740 /ash/host
parent93dc8d7c4de2bd7f623ad60aa20c3e1942f9fa05 (diff)
downloadchromium_src-2cfce41ad55ec1d81bfcd1ad56f5da2f13428665.zip
chromium_src-2cfce41ad55ec1d81bfcd1ad56f5da2f13428665.tar.gz
chromium_src-2cfce41ad55ec1d81bfcd1ad56f5da2f13428665.tar.bz2
Add ability to change display orientation on Ozone
NOTRY=true BUG=none Review URL: https://codereview.chromium.org/283603002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269888 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/host')
-rw-r--r--ash/host/ash_window_tree_host_ozone.cc71
1 files changed, 63 insertions, 8 deletions
diff --git a/ash/host/ash_window_tree_host_ozone.cc b/ash/host/ash_window_tree_host_ozone.cc
index cfe8b25..8fe2ba5 100644
--- a/ash/host/ash_window_tree_host_ozone.cc
+++ b/ash/host/ash_window_tree_host_ozone.cc
@@ -5,9 +5,11 @@
#include "ash/host/ash_window_tree_host.h"
#include "ash/host/root_window_transformer.h"
+#include "ash/host/transformer_helper.h"
#include "base/command_line.h"
#include "ui/aura/window_tree_host_ozone.h"
#include "ui/gfx/geometry/insets.h"
+#include "ui/gfx/transform.h"
namespace ash {
namespace {
@@ -15,22 +17,75 @@ namespace {
class AshWindowTreeHostOzone : public AshWindowTreeHost,
public aura::WindowTreeHostOzone {
public:
- explicit AshWindowTreeHostOzone(const gfx::Rect& initial_bounds)
- : aura::WindowTreeHostOzone(initial_bounds) {}
- virtual ~AshWindowTreeHostOzone() {}
+ explicit AshWindowTreeHostOzone(const gfx::Rect& initial_bounds);
+ virtual ~AshWindowTreeHostOzone();
private:
// AshWindowTreeHost:
- virtual void ToggleFullScreen() OVERRIDE { NOTIMPLEMENTED(); }
- virtual bool ConfineCursorToRootWindow() OVERRIDE { return false; }
- virtual void UnConfineCursor() OVERRIDE { NOTIMPLEMENTED(); }
+ virtual void ToggleFullScreen() OVERRIDE;
+ virtual bool ConfineCursorToRootWindow() OVERRIDE;
+ virtual void UnConfineCursor() OVERRIDE;
virtual void SetRootWindowTransformer(
- scoped_ptr<RootWindowTransformer> transformer) OVERRIDE {}
- virtual aura::WindowTreeHost* AsWindowTreeHost() OVERRIDE { return this; }
+ scoped_ptr<RootWindowTransformer> transformer) OVERRIDE;
+ virtual gfx::Insets GetHostInsets() const OVERRIDE;
+ virtual aura::WindowTreeHost* AsWindowTreeHost() OVERRIDE;
+ virtual void SetRootTransform(const gfx::Transform& transform) OVERRIDE;
+ virtual gfx::Transform GetRootTransform() const OVERRIDE;
+ virtual gfx::Transform GetInverseRootTransform() const OVERRIDE;
+ virtual void UpdateRootWindowSize(const gfx::Size& host_size) OVERRIDE;
+
+ TransformerHelper transformer_helper_;
DISALLOW_COPY_AND_ASSIGN(AshWindowTreeHostOzone);
};
+AshWindowTreeHostOzone::AshWindowTreeHostOzone(const gfx::Rect& initial_bounds)
+ : aura::WindowTreeHostOzone(initial_bounds),
+ transformer_helper_(this) {}
+
+AshWindowTreeHostOzone::~AshWindowTreeHostOzone() {}
+
+void AshWindowTreeHostOzone::ToggleFullScreen() {
+ NOTIMPLEMENTED();
+}
+
+bool AshWindowTreeHostOzone::ConfineCursorToRootWindow() {
+ return false;
+}
+
+void AshWindowTreeHostOzone::UnConfineCursor() {
+ NOTIMPLEMENTED();
+}
+
+void AshWindowTreeHostOzone::SetRootWindowTransformer(
+ scoped_ptr<RootWindowTransformer> transformer) {
+ transformer_helper_.SetRootWindowTransformer(transformer.Pass());
+}
+
+gfx::Insets AshWindowTreeHostOzone::GetHostInsets() const {
+ return transformer_helper_.GetHostInsets();
+}
+
+aura::WindowTreeHost* AshWindowTreeHostOzone::AsWindowTreeHost() {
+ return this;
+}
+
+void AshWindowTreeHostOzone::SetRootTransform(const gfx::Transform& transform) {
+ transformer_helper_.GetTransform();
+}
+
+gfx::Transform AshWindowTreeHostOzone::GetRootTransform() const {
+ return transformer_helper_.GetTransform();
+}
+
+gfx::Transform AshWindowTreeHostOzone::GetInverseRootTransform() const {
+ return transformer_helper_.GetInverseTransform();
+}
+
+void AshWindowTreeHostOzone::UpdateRootWindowSize(const gfx::Size& host_size) {
+ transformer_helper_.UpdateWindowSize(host_size);
+}
+
} // namespace
AshWindowTreeHost* AshWindowTreeHost::Create(const gfx::Rect& initial_bounds) {