| 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_ASH_WINDOW_TREE_HOST_H_ | 5 #ifndef ASH_HOST_ASH_WINDOW_TREE_HOST_H_ |
| 6 #define ASH_HOST_ASH_WINDOW_TREE_HOST_H_ | 6 #define ASH_HOST_ASH_WINDOW_TREE_HOST_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| 11 #include "base/callback_forward.h" | |
| 12 | 11 |
| 13 namespace aura { | 12 namespace aura { |
| 14 class WindowTreeHost; | 13 class WindowTreeHost; |
| 15 } | 14 } |
| 16 | 15 |
| 17 namespace gfx { | 16 namespace gfx { |
| 18 class Insets; | 17 class Insets; |
| 19 } | 18 } |
| 20 | 19 |
| 21 namespace ui { | 20 namespace ui { |
| 22 class LocatedEvent; | 21 class LocatedEvent; |
| 23 } | 22 } |
| 24 | 23 |
| 25 namespace ash { | 24 namespace ash { |
| 26 struct AshWindowTreeHostInitParams; | 25 struct AshWindowTreeHostInitParams; |
| 27 class InputMethodEventHandler; | 26 class InputMethodEventHandler; |
| 28 class RootWindowTransformer; | 27 class RootWindowTransformer; |
| 29 | 28 |
| 30 class ASH_EXPORT AshWindowTreeHost { | 29 class ASH_EXPORT AshWindowTreeHost { |
| 31 public: | 30 public: |
| 32 using Factory = | |
| 33 base::Callback<AshWindowTreeHost*(const AshWindowTreeHostInitParams&)>; | |
| 34 AshWindowTreeHost(); | 31 AshWindowTreeHost(); |
| 35 virtual ~AshWindowTreeHost() {} | 32 virtual ~AshWindowTreeHost() {} |
| 36 | 33 |
| 37 // Creates a new AshWindowTreeHost. The caller owns the returned value. | 34 // Creates a new AshWindowTreeHost. The caller owns the returned value. |
| 38 static AshWindowTreeHost* Create( | 35 static AshWindowTreeHost* Create( |
| 39 const AshWindowTreeHostInitParams& init_params); | 36 const AshWindowTreeHostInitParams& init_params); |
| 40 static void SetFactory(const Factory& factory); | |
| 41 | 37 |
| 42 void set_input_method_handler(InputMethodEventHandler* input_method_handler) { | 38 void set_input_method_handler(InputMethodEventHandler* input_method_handler) { |
| 43 input_method_handler_ = input_method_handler; | 39 input_method_handler_ = input_method_handler; |
| 44 } | 40 } |
| 45 | 41 |
| 46 InputMethodEventHandler* input_method_handler() { | 42 InputMethodEventHandler* input_method_handler() { |
| 47 return input_method_handler_; | 43 return input_method_handler_; |
| 48 } | 44 } |
| 49 | 45 |
| 50 // Toggles the host's full screen state. | 46 // Toggles the host's full screen state. |
| (...skipping 23 matching lines...) Expand all Loading... |
| 74 // Translates the native mouse location into screen coordinates. | 70 // Translates the native mouse location into screen coordinates. |
| 75 void TranslateLocatedEvent(ui::LocatedEvent* event); | 71 void TranslateLocatedEvent(ui::LocatedEvent* event); |
| 76 | 72 |
| 77 private: | 73 private: |
| 78 InputMethodEventHandler* input_method_handler_; | 74 InputMethodEventHandler* input_method_handler_; |
| 79 }; | 75 }; |
| 80 | 76 |
| 81 } // namespace ash | 77 } // namespace ash |
| 82 | 78 |
| 83 #endif // ASH_HOST_ASH_WINDOW_TREE_HOST_H_ | 79 #endif // ASH_HOST_ASH_WINDOW_TREE_HOST_H_ |
| OLD | NEW |