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/transformer_helper.h" | 5 #include "ash/host/transformer_helper.h" |
6 | 6 |
7 #include "ash/host/ash_window_tree_host.h" | 7 #include "ash/host/ash_window_tree_host.h" |
8 #include "ash/host/root_window_transformer.h" | 8 #include "ash/host/root_window_transformer.h" |
9 #include "ui/aura/window.h" | 9 #include "ui/aura/window.h" |
10 #include "ui/aura/window_tree_host.h" | 10 #include "ui/aura/window_tree_host.h" |
11 #include "ui/compositor/dip_util.h" | 11 #include "ui/compositor/dip_util.h" |
12 #include "ui/gfx/geometry/insets.h" | 12 #include "ui/gfx/geometry/insets.h" |
13 #include "ui/gfx/geometry/rect.h" | 13 #include "ui/gfx/geometry/rect.h" |
14 #include "ui/gfx/geometry/rect_f.h" | 14 #include "ui/gfx/geometry/rect_f.h" |
15 #include "ui/gfx/geometry/size.h" | 15 #include "ui/gfx/geometry/size.h" |
16 #include "ui/gfx/size_conversions.h" | 16 #include "ui/gfx/geometry/size_conversions.h" |
17 #include "ui/gfx/transform.h" | 17 #include "ui/gfx/transform.h" |
18 | 18 |
19 namespace ash { | 19 namespace ash { |
20 namespace { | 20 namespace { |
21 | 21 |
22 // A simple RootWindowTransformer without host insets. | 22 // A simple RootWindowTransformer without host insets. |
23 class SimpleRootWindowTransformer : public RootWindowTransformer { | 23 class SimpleRootWindowTransformer : public RootWindowTransformer { |
24 public: | 24 public: |
25 SimpleRootWindowTransformer(const aura::Window* root_window, | 25 SimpleRootWindowTransformer(const aura::Window* root_window, |
26 const gfx::Transform& transform) | 26 const gfx::Transform& transform) |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 transform.Scale(1.0f / scale, 1.0f / scale); | 101 transform.Scale(1.0f / scale, 1.0f / scale); |
102 return transformer_->GetInverseTransform() * transform; | 102 return transformer_->GetInverseTransform() * transform; |
103 } | 103 } |
104 | 104 |
105 void TransformerHelper::UpdateWindowSize(const gfx::Size& host_size) { | 105 void TransformerHelper::UpdateWindowSize(const gfx::Size& host_size) { |
106 ash_host_->AsWindowTreeHost()->window()->SetBounds( | 106 ash_host_->AsWindowTreeHost()->window()->SetBounds( |
107 transformer_->GetRootWindowBounds(host_size)); | 107 transformer_->GetRootWindowBounds(host_size)); |
108 } | 108 } |
109 | 109 |
110 } // namespace ash | 110 } // namespace ash |
OLD | NEW |