| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/host/ash_window_tree_host.h" | 5 #include "ash/host/ash_window_tree_host.h" |
| 6 | 6 |
| 7 #include "ash/host/ash_window_tree_host_init_params.h" | 7 #include "ash/host/ash_window_tree_host_init_params.h" |
| 8 #include "ash/host/root_window_transformer.h" | 8 #include "ash/host/root_window_transformer.h" |
| 9 #include "ash/host/transformer_helper.h" | 9 #include "ash/host/transformer_helper.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 virtual bool ConfineCursorToRootWindow() override; | 27 virtual bool ConfineCursorToRootWindow() override; |
| 28 virtual void UnConfineCursor() override; | 28 virtual void UnConfineCursor() override; |
| 29 virtual void SetRootWindowTransformer( | 29 virtual void SetRootWindowTransformer( |
| 30 scoped_ptr<RootWindowTransformer> transformer) override; | 30 scoped_ptr<RootWindowTransformer> transformer) override; |
| 31 virtual gfx::Insets GetHostInsets() const override; | 31 virtual gfx::Insets GetHostInsets() const override; |
| 32 virtual aura::WindowTreeHost* AsWindowTreeHost() override; | 32 virtual aura::WindowTreeHost* AsWindowTreeHost() override; |
| 33 virtual void SetRootTransform(const gfx::Transform& transform) override; | 33 virtual void SetRootTransform(const gfx::Transform& transform) override; |
| 34 virtual gfx::Transform GetRootTransform() const override; | 34 virtual gfx::Transform GetRootTransform() const override; |
| 35 virtual gfx::Transform GetInverseRootTransform() const override; | 35 virtual gfx::Transform GetInverseRootTransform() const override; |
| 36 virtual void UpdateRootWindowSize(const gfx::Size& host_size) override; | 36 virtual void UpdateRootWindowSize(const gfx::Size& host_size) override; |
| 37 virtual void DispatchEvent(ui::Event* event) override; |
| 37 | 38 |
| 38 TransformerHelper transformer_helper_; | 39 TransformerHelper transformer_helper_; |
| 39 | 40 |
| 40 DISALLOW_COPY_AND_ASSIGN(AshWindowTreeHostOzone); | 41 DISALLOW_COPY_AND_ASSIGN(AshWindowTreeHostOzone); |
| 41 }; | 42 }; |
| 42 | 43 |
| 43 AshWindowTreeHostOzone::AshWindowTreeHostOzone(const gfx::Rect& initial_bounds) | 44 AshWindowTreeHostOzone::AshWindowTreeHostOzone(const gfx::Rect& initial_bounds) |
| 44 : aura::WindowTreeHostOzone(initial_bounds), | 45 : aura::WindowTreeHostOzone(initial_bounds), |
| 45 transformer_helper_(this) {} | 46 transformer_helper_(this) {} |
| 46 | 47 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 } | 81 } |
| 81 | 82 |
| 82 gfx::Transform AshWindowTreeHostOzone::GetInverseRootTransform() const { | 83 gfx::Transform AshWindowTreeHostOzone::GetInverseRootTransform() const { |
| 83 return transformer_helper_.GetInverseTransform(); | 84 return transformer_helper_.GetInverseTransform(); |
| 84 } | 85 } |
| 85 | 86 |
| 86 void AshWindowTreeHostOzone::UpdateRootWindowSize(const gfx::Size& host_size) { | 87 void AshWindowTreeHostOzone::UpdateRootWindowSize(const gfx::Size& host_size) { |
| 87 transformer_helper_.UpdateWindowSize(host_size); | 88 transformer_helper_.UpdateWindowSize(host_size); |
| 88 } | 89 } |
| 89 | 90 |
| 91 void AshWindowTreeHostOzone::DispatchEvent(ui::Event* event) { |
| 92 if (event->IsLocatedEvent()) |
| 93 TranslateLocatedEvent(static_cast<ui::LocatedEvent*>(event)); |
| 94 SendEventToProcessor(event); |
| 95 } |
| 96 |
| 90 } // namespace | 97 } // namespace |
| 91 | 98 |
| 92 AshWindowTreeHost* AshWindowTreeHost::Create( | 99 AshWindowTreeHost* AshWindowTreeHost::Create( |
| 93 const AshWindowTreeHostInitParams& init_params) { | 100 const AshWindowTreeHostInitParams& init_params) { |
| 94 return new AshWindowTreeHostOzone(init_params.initial_bounds); | 101 return new AshWindowTreeHostOzone(init_params.initial_bounds); |
| 95 } | 102 } |
| 96 | 103 |
| 97 } // namespace ash | 104 } // namespace ash |
| OLD | NEW |