| 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 #ifndef ASH_HOST_TRANSFORMER_HELPER_H_ | 5 #ifndef ASH_HOST_TRANSFORMER_HELPER_H_ |
| 6 #define ASH_HOST_TRANSFORMER_HELPER_H_ | 6 #define ASH_HOST_TRANSFORMER_HELPER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" |
| 10 #include "base/macros.h" | 11 #include "base/macros.h" |
| 11 | 12 |
| 12 namespace gfx { | 13 namespace gfx { |
| 13 class Insets; | 14 class Insets; |
| 14 class Size; | 15 class Size; |
| 15 class Transform; | 16 class Transform; |
| 16 } | 17 } |
| 17 | 18 |
| 18 namespace ash { | 19 namespace ash { |
| 19 class AshWindowTreeHost; | 20 class AshWindowTreeHost; |
| 20 class RootWindowTransformer; | 21 class RootWindowTransformer; |
| 21 | 22 |
| 22 // A helper class to handle ash specific feature that requires | 23 // A helper class to handle ash specific feature that requires |
| 23 // transforming a root window (such as rotation, UI zooming). | 24 // transforming a root window (such as rotation, UI zooming). |
| 24 class TransformerHelper { | 25 class ASH_EXPORT TransformerHelper { |
| 25 public: | 26 public: |
| 26 explicit TransformerHelper(AshWindowTreeHost* ash_host); | 27 explicit TransformerHelper(AshWindowTreeHost* ash_host); |
| 27 ~TransformerHelper(); | 28 ~TransformerHelper(); |
| 28 | 29 |
| 29 // Initializes the transformer with identity transform. | 30 // Initializes the transformer with identity transform. |
| 30 void Init(); | 31 void Init(); |
| 31 | 32 |
| 32 // Returns the the insets that specifies the effective root window | 33 // Returns the the insets that specifies the effective root window |
| 33 // area within the host window. | 34 // area within the host window. |
| 34 gfx::Insets GetHostInsets() const; | 35 gfx::Insets GetHostInsets() const; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 51 private: | 52 private: |
| 52 AshWindowTreeHost* ash_host_; | 53 AshWindowTreeHost* ash_host_; |
| 53 std::unique_ptr<RootWindowTransformer> transformer_; | 54 std::unique_ptr<RootWindowTransformer> transformer_; |
| 54 | 55 |
| 55 DISALLOW_COPY_AND_ASSIGN(TransformerHelper); | 56 DISALLOW_COPY_AND_ASSIGN(TransformerHelper); |
| 56 }; | 57 }; |
| 57 | 58 |
| 58 } // namespace ash | 59 } // namespace ash |
| 59 | 60 |
| 60 #endif // ASH_HOST_TRANSFORMER_HELPER_H_ | 61 #endif // ASH_HOST_TRANSFORMER_HELPER_H_ |
| OLD | NEW |