Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: ui/base/ime/text_input_client.h

Issue 782673002: MacViews: tryjobs for toolkit_views=1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: latest crrev/901823002 Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/ime/ui_base_ime_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 class KeyEvent;
25
24 // An interface implemented by a View that needs text input support. 26 // An interface implemented by a View that needs text input support.
25 class UI_BASE_IME_EXPORT TextInputClient { 27 class UI_BASE_IME_EXPORT TextInputClient {
26 public: 28 public:
27 virtual ~TextInputClient(); 29 virtual ~TextInputClient();
28 30
29 // Input method result ------------------------------------------------------- 31 // Input method result -------------------------------------------------------
30 32
31 // Sets composition text and attributes. If there is composition text already, 33 // 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 34 // 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 35 // replaced. If there is no selection, the composition text will be inserted
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 virtual void OnCandidateWindowShown() = 0; 171 virtual void OnCandidateWindowShown() = 0;
170 // Called when IME updates any appearance of the current candidate window. 172 // Called when IME updates any appearance of the current candidate window.
171 virtual void OnCandidateWindowUpdated() = 0; 173 virtual void OnCandidateWindowUpdated() = 0;
172 // Called when IME hides the candidate window. 174 // Called when IME hides the candidate window.
173 virtual void OnCandidateWindowHidden() = 0; 175 virtual void OnCandidateWindowHidden() = 0;
174 176
175 // Returns true if |command_id| is currently allowed to be executed. 177 // Returns true if |command_id| is currently allowed to be executed.
176 virtual bool IsEditingCommandEnabled(int command_id) = 0; 178 virtual bool IsEditingCommandEnabled(int command_id) = 0;
177 // Execute the command specified by |command_id|. 179 // Execute the command specified by |command_id|.
178 virtual void ExecuteEditingCommand(int command_id) = 0; 180 virtual void ExecuteEditingCommand(int command_id) = 0;
181
182 // Called in response to a KeyEvent before it is translated into an insert or
183 // editing command. Return true if |key_event| shouldn't be further processed.
184 virtual bool HandleAsKeyEventOnly(const ui::KeyEvent& key_event) = 0;
179 }; 185 };
180 186
181 } // namespace ui 187 } // namespace ui
182 188
183 #endif // UI_BASE_IME_TEXT_INPUT_CLIENT_H_ 189 #endif // UI_BASE_IME_TEXT_INPUT_CLIENT_H_
OLDNEW
« no previous file with comments | « ui/base/ime/input_method_chromeos_unittest.cc ('k') | ui/events/keycodes/keyboard_code_conversion_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698