Chromium Code Reviews| 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_BASE_IME_INPUT_METHOD_H_ | 5 #ifndef UI_BASE_IME_INPUT_METHOD_H_ |
| 6 #define UI_BASE_IME_INPUT_METHOD_H_ | 6 #define UI_BASE_IME_INPUT_METHOD_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/event_types.h" | 13 #include "base/event_types.h" |
| 14 #include "base/memory/scoped_vector.h" | 14 #include "base/memory/scoped_vector.h" |
| 15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
| 16 #include "ui/base/ime/text_input_mode.h" | 16 #include "ui/base/ime/text_input_mode.h" |
| 17 #include "ui/base/ime/text_input_type.h" | 17 #include "ui/base/ime/text_input_type.h" |
| 18 #include "ui/gfx/geometry/rect.h" | |
| 18 | 19 |
| 19 namespace extensions { | 20 namespace extensions { |
| 20 class InputImeApiTest; | 21 class InputImeApiTest; |
| 21 } // namespace extensions | 22 } // namespace extensions |
| 22 | 23 |
| 23 namespace ui { | 24 namespace ui { |
| 24 | 25 |
| 25 namespace internal { | 26 namespace internal { |
| 26 class InputMethodDelegate; | 27 class InputMethodDelegate; |
| 27 } // namespace internal | 28 } // namespace internal |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 153 // of IME popups is not supported. | 154 // of IME popups is not supported. |
| 154 virtual bool IsCandidatePopupOpen() const = 0; | 155 virtual bool IsCandidatePopupOpen() const = 0; |
| 155 | 156 |
| 156 // Displays an on screen keyboard if enabled. | 157 // Displays an on screen keyboard if enabled. |
| 157 virtual void ShowImeIfNeeded() = 0; | 158 virtual void ShowImeIfNeeded() = 0; |
| 158 | 159 |
| 159 // Management of the observer list. | 160 // Management of the observer list. |
| 160 virtual void AddObserver(InputMethodObserver* observer) = 0; | 161 virtual void AddObserver(InputMethodObserver* observer) = 0; |
| 161 virtual void RemoveObserver(InputMethodObserver* observer) = 0; | 162 virtual void RemoveObserver(InputMethodObserver* observer) = 0; |
| 162 | 163 |
| 164 // Set covered screen bounds when virtual keyboard is active. | |
| 165 virtual void SetCoveredBounds(const gfx::Rect& new_bounds) {} | |
|
sadrul
2016/12/08 02:57:07
InputMethod::SetCoveredBounds() doesn't make a lot
yhanada
2016/12/12 08:38:28
Renamed to |SetOnScreenKeyboardBounds|.
| |
| 166 | |
| 163 protected: | 167 protected: |
| 164 friend class extensions::InputImeApiTest; | 168 friend class extensions::InputImeApiTest; |
| 165 | 169 |
| 166 // Gets the tracked key events of using input.ime.sendKeyEvents API. | 170 // Gets the tracked key events of using input.ime.sendKeyEvents API. |
| 167 virtual const std::vector<std::unique_ptr<ui::KeyEvent>>& | 171 virtual const std::vector<std::unique_ptr<ui::KeyEvent>>& |
| 168 GetKeyEventsForTesting() = 0; | 172 GetKeyEventsForTesting() = 0; |
| 169 | 173 |
| 170 // Whether the key events will be tracked. Only used for testing. | 174 // Whether the key events will be tracked. Only used for testing. |
| 171 bool track_key_events_for_testing_; | 175 bool track_key_events_for_testing_; |
| 172 }; | 176 }; |
| 173 | 177 |
| 174 } // namespace ui | 178 } // namespace ui |
| 175 | 179 |
| 176 #endif // UI_BASE_IME_INPUT_METHOD_H_ | 180 #endif // UI_BASE_IME_INPUT_METHOD_H_ |
| OLD | NEW |