| 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_VIEWS_IME_INPUT_METHOD_H_ | 5 #ifndef UI_VIEWS_IME_INPUT_METHOD_H_ |
| 6 #define UI_VIEWS_IME_INPUT_METHOD_H_ | 6 #define UI_VIEWS_IME_INPUT_METHOD_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 class View; | 27 class View; |
| 28 class Widget; | 28 class Widget; |
| 29 | 29 |
| 30 // An interface implemented by an object that encapsulates a native input method | 30 // An interface implemented by an object that encapsulates a native input method |
| 31 // service provided by the underlying operation system. Input method services | 31 // service provided by the underlying operation system. Input method services |
| 32 // are typically bound to individual native windows (HWND, aura::Window, etc.). | 32 // are typically bound to individual native windows (HWND, aura::Window, etc.). |
| 33 // In Views, only the top-level Widgets get keyboard focus, so this API is | 33 // In Views, only the top-level Widgets get keyboard focus, so this API is |
| 34 // designed to be bound to top-level Widgets. | 34 // designed to be bound to top-level Widgets. |
| 35 class VIEWS_EXPORT InputMethod { | 35 class VIEWS_EXPORT InputMethod { |
| 36 public: | 36 public: |
| 37 // TODO(yukawa): Move these typedef into ime_constants.h or somewhere. | 37 |
| 38 #if defined(OS_WIN) | 38 #if defined(OS_WIN) |
| 39 typedef LRESULT NativeEventResult; | 39 typedef LRESULT NativeEventResult; |
| 40 #else | 40 #else |
| 41 typedef int32 NativeEventResult; | 41 typedef int32 NativeEventResult; |
| 42 #endif | 42 #endif |
| 43 | 43 |
| 44 virtual ~InputMethod() {} | 44 virtual ~InputMethod() {} |
| 45 | 45 |
| 46 // Sets the delegate used by this InputMethod instance. | 46 // Sets the delegate used by this InputMethod instance. |
| 47 // This should only be called by the owner Widget or testing code. | 47 // This should only be called by the owner Widget or testing code. |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 119 |
| 120 // Returns true if the input method is a mock instance used for testing. | 120 // Returns true if the input method is a mock instance used for testing. |
| 121 virtual bool IsMock() const = 0; | 121 virtual bool IsMock() const = 0; |
| 122 | 122 |
| 123 // TODO(suzhe): Support mouse/touch event. | 123 // TODO(suzhe): Support mouse/touch event. |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 } // namespace views | 126 } // namespace views |
| 127 | 127 |
| 128 #endif // UI_VIEWS_IME_INPUT_METHOD_H_ | 128 #endif // UI_VIEWS_IME_INPUT_METHOD_H_ |
| OLD | NEW |