| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 VIEWS_IME_INPUT_METHOD_IBUS_H_ | 5 #ifndef VIEWS_IME_INPUT_METHOD_IBUS_H_ |
| 6 #define VIEWS_IME_INPUT_METHOD_IBUS_H_ | 6 #define VIEWS_IME_INPUT_METHOD_IBUS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 virtual void OnFocus() OVERRIDE; | 34 virtual void OnFocus() OVERRIDE; |
| 35 virtual void OnBlur() OVERRIDE; | 35 virtual void OnBlur() OVERRIDE; |
| 36 virtual void DispatchKeyEvent(const KeyEvent& key) OVERRIDE; | 36 virtual void DispatchKeyEvent(const KeyEvent& key) OVERRIDE; |
| 37 virtual void OnTextInputTypeChanged(View* view) OVERRIDE; | 37 virtual void OnTextInputTypeChanged(View* view) OVERRIDE; |
| 38 virtual void OnCaretBoundsChanged(View* view) OVERRIDE; | 38 virtual void OnCaretBoundsChanged(View* view) OVERRIDE; |
| 39 virtual void CancelComposition(View* view) OVERRIDE; | 39 virtual void CancelComposition(View* view) OVERRIDE; |
| 40 virtual std::string GetInputLocale() OVERRIDE; | 40 virtual std::string GetInputLocale() OVERRIDE; |
| 41 virtual base::i18n::TextDirection GetInputTextDirection() OVERRIDE; | 41 virtual base::i18n::TextDirection GetInputTextDirection() OVERRIDE; |
| 42 virtual bool IsActive() OVERRIDE; | 42 virtual bool IsActive() OVERRIDE; |
| 43 | 43 |
| 44 // Returns true when |
| 45 // 1) built with GYP_DEFINES="touchui=1" or, |
| 46 // 2) enabled by SetEnabledInputMethodIBus or, |
| 47 // 3) enabled by command line flag "--enable-inputmethod-ibus" |
| 48 static bool IsInputMethodIBusEnabled(); |
| 49 // Enable/Disable InputMethodIBus |
| 50 static void SetEnableInputMethodIBus(bool enabled); |
| 51 |
| 44 private: | 52 private: |
| 45 // A class to hold all data related to a key event being processed by the | 53 // A class to hold all data related to a key event being processed by the |
| 46 // input method but still has no result back yet. | 54 // input method but still has no result back yet. |
| 47 class PendingKeyEvent; | 55 class PendingKeyEvent; |
| 48 | 56 |
| 49 // A class to hold information of a pending request for creating an ibus input | 57 // A class to hold information of a pending request for creating an ibus input |
| 50 // context. | 58 // context. |
| 51 class PendingCreateICRequest; | 59 class PendingCreateICRequest; |
| 52 | 60 |
| 53 // Overridden from InputMethodBase: | 61 // Overridden from InputMethodBase: |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 // If it's true then all input method result received before the next key | 198 // If it's true then all input method result received before the next key |
| 191 // event will be discarded. | 199 // event will be discarded. |
| 192 bool suppress_next_result_; | 200 bool suppress_next_result_; |
| 193 | 201 |
| 194 DISALLOW_COPY_AND_ASSIGN(InputMethodIBus); | 202 DISALLOW_COPY_AND_ASSIGN(InputMethodIBus); |
| 195 }; | 203 }; |
| 196 | 204 |
| 197 } // namespace views | 205 } // namespace views |
| 198 | 206 |
| 199 #endif // VIEWS_IME_INPUT_METHOD_IBUS_H_ | 207 #endif // VIEWS_IME_INPUT_METHOD_IBUS_H_ |
| OLD | NEW |