| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_AURA_WINDOW_TREE_HOST_H_ | 5 #ifndef UI_AURA_WINDOW_TREE_HOST_H_ |
| 6 #define UI_AURA_WINDOW_TREE_HOST_H_ | 6 #define UI_AURA_WINDOW_TREE_HOST_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 // Moves the cursor to the specified location relative to the root window. | 126 // Moves the cursor to the specified location relative to the root window. |
| 127 void MoveCursorToLocationInDIP(const gfx::Point& location_in_dip); | 127 void MoveCursorToLocationInDIP(const gfx::Point& location_in_dip); |
| 128 | 128 |
| 129 // Moves the cursor to the |location_in_pixels| given in host coordinates. | 129 // Moves the cursor to the |location_in_pixels| given in host coordinates. |
| 130 void MoveCursorToLocationInPixels(const gfx::Point& location_in_pixels); | 130 void MoveCursorToLocationInPixels(const gfx::Point& location_in_pixels); |
| 131 | 131 |
| 132 gfx::NativeCursor last_cursor() const { return last_cursor_; } | 132 gfx::NativeCursor last_cursor() const { return last_cursor_; } |
| 133 | 133 |
| 134 // Gets the InputMethod instance, if NULL, creates & owns it. | 134 // Gets the InputMethod instance, if NULL, creates & owns it. |
| 135 ui::InputMethod* GetInputMethod(); | 135 ui::InputMethod* GetInputMethod(); |
| 136 bool has_input_method() const { return input_method_ != nullptr; } | |
| 137 | 136 |
| 138 // Sets a shared unowned InputMethod. This is used when there is a singleton | 137 // Sets a shared unowned InputMethod. This is used when there is a singleton |
| 139 // InputMethod shared between multiple WindowTreeHost instances. | 138 // InputMethod shared between multiple WindowTreeHost instances. |
| 140 // | 139 // |
| 141 // This is used for Ash only. There are 2 reasons: | 140 // This is used for Ash only. There are 2 reasons: |
| 142 // 1) ChromeOS virtual keyboard needs to receive ShowImeIfNeeded notification | 141 // 1) ChromeOS virtual keyboard needs to receive ShowImeIfNeeded notification |
| 143 // from InputMethod. Multiple InputMethod instances makes it hard to | 142 // from InputMethod. Multiple InputMethod instances makes it hard to |
| 144 // register/unregister the observer for that notification. | 143 // register/unregister the observer for that notification. |
| 145 // 2) For Ozone, there is no native focus state for the root window and | 144 // 2) For Ozone, there is no native focus state for the root window and |
| 146 // WindowTreeHost. See DrmWindowHost::CanDispatchEvent, the key events always | 145 // WindowTreeHost. See DrmWindowHost::CanDispatchEvent, the key events always |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 bool owned_input_method_; | 265 bool owned_input_method_; |
| 267 | 266 |
| 268 gfx::Insets output_surface_padding_in_pixels_; | 267 gfx::Insets output_surface_padding_in_pixels_; |
| 269 | 268 |
| 270 DISALLOW_COPY_AND_ASSIGN(WindowTreeHost); | 269 DISALLOW_COPY_AND_ASSIGN(WindowTreeHost); |
| 271 }; | 270 }; |
| 272 | 271 |
| 273 } // namespace aura | 272 } // namespace aura |
| 274 | 273 |
| 275 #endif // UI_AURA_WINDOW_TREE_HOST_H_ | 274 #endif // UI_AURA_WINDOW_TREE_HOST_H_ |
| OLD | NEW |