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

Unified Diff: ash/host/ash_window_tree_host_ozone.cc

Issue 283603002: Add ability to change display orientation on Ozone (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/host/ash_window_tree_host_ozone.cc
diff --git a/ash/host/ash_window_tree_host_ozone.cc b/ash/host/ash_window_tree_host_ozone.cc
index cfe8b25d336d93499e67c4bfb9bf9c27e970a091..8fe2ba585469296857f175c6f8fffe5b842ebabc 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) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698