| 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_TEXT_INPUT_CLIENT_H_ | 5 #ifndef UI_BASE_IME_TEXT_INPUT_CLIENT_H_ |
| 6 #define UI_BASE_IME_TEXT_INPUT_CLIENT_H_ | 6 #define UI_BASE_IME_TEXT_INPUT_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| 11 #include "ui/base/ime/composition_text.h" | 11 #include "ui/base/ime/composition_text.h" |
| 12 #include "ui/base/ime/text_input_mode.h" | 12 #include "ui/base/ime/text_input_mode.h" |
| 13 #include "ui/base/ime/text_input_type.h" | 13 #include "ui/base/ime/text_input_type.h" |
| 14 #include "ui/base/ime/ui_base_ime_export.h" | 14 #include "ui/base/ui_base_export.h" |
| 15 #include "ui/gfx/native_widget_types.h" | 15 #include "ui/gfx/native_widget_types.h" |
| 16 #include "ui/gfx/range/range.h" | 16 #include "ui/gfx/range/range.h" |
| 17 | 17 |
| 18 namespace gfx { | 18 namespace gfx { |
| 19 class Rect; | 19 class Rect; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace ui { | 22 namespace ui { |
| 23 | 23 |
| 24 // An interface implemented by a View that needs text input support. | 24 // An interface implemented by a View that needs text input support. |
| 25 class UI_BASE_IME_EXPORT TextInputClient { | 25 class UI_BASE_EXPORT TextInputClient { |
| 26 public: | 26 public: |
| 27 virtual ~TextInputClient(); | 27 virtual ~TextInputClient(); |
| 28 | 28 |
| 29 // Input method result ------------------------------------------------------- | 29 // Input method result ------------------------------------------------------- |
| 30 | 30 |
| 31 // Sets composition text and attributes. If there is composition text already, | 31 // Sets composition text and attributes. If there is composition text already, |
| 32 // it'll be replaced by the new one. Otherwise, current selection will be | 32 // it'll be replaced by the new one. Otherwise, current selection will be |
| 33 // replaced. If there is no selection, the composition text will be inserted | 33 // replaced. If there is no selection, the composition text will be inserted |
| 34 // at the insertion point. | 34 // at the insertion point. |
| 35 virtual void SetCompositionText(const ui::CompositionText& composition) = 0; | 35 virtual void SetCompositionText(const ui::CompositionText& composition) = 0; |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 | 174 |
| 175 // Returns true if |command_id| is currently allowed to be executed. | 175 // Returns true if |command_id| is currently allowed to be executed. |
| 176 virtual bool IsEditingCommandEnabled(int command_id) = 0; | 176 virtual bool IsEditingCommandEnabled(int command_id) = 0; |
| 177 // Execute the command specified by |command_id|. | 177 // Execute the command specified by |command_id|. |
| 178 virtual void ExecuteEditingCommand(int command_id) = 0; | 178 virtual void ExecuteEditingCommand(int command_id) = 0; |
| 179 }; | 179 }; |
| 180 | 180 |
| 181 } // namespace ui | 181 } // namespace ui |
| 182 | 182 |
| 183 #endif // UI_BASE_IME_TEXT_INPUT_CLIENT_H_ | 183 #endif // UI_BASE_IME_TEXT_INPUT_CLIENT_H_ |
| OLD | NEW |