Commit 2cfce41a authored by dnicoara@chromium.org's avatar dnicoara@chromium.org

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
parent 93dc8d7c
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment