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

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

Issue 100303003: Move more uses of string16 to specify base:: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « ui/base/ime/composition_text.h ('k') | ui/base/l10n/l10n_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
(...skipping 25 matching lines...) Expand all
36 36
37 // Converts current composition text into final content. 37 // Converts current composition text into final content.
38 virtual void ConfirmCompositionText() = 0; 38 virtual void ConfirmCompositionText() = 0;
39 39
40 // Removes current composition text. 40 // Removes current composition text.
41 virtual void ClearCompositionText() = 0; 41 virtual void ClearCompositionText() = 0;
42 42
43 // Inserts a given text at the insertion point. Current composition text or 43 // Inserts a given text at the insertion point. Current composition text or
44 // selection will be removed. This method should never be called when the 44 // selection will be removed. This method should never be called when the
45 // current text input type is TEXT_INPUT_TYPE_NONE. 45 // current text input type is TEXT_INPUT_TYPE_NONE.
46 virtual void InsertText(const string16& text) = 0; 46 virtual void InsertText(const base::string16& text) = 0;
47 47
48 // Inserts a single char at the insertion point. Unlike above InsertText() 48 // Inserts a single char at the insertion point. Unlike above InsertText()
49 // method, this method has an extra |flags| parameter indicating the modifier 49 // method, this method has an extra |flags| parameter indicating the modifier
50 // key states when the character is generated. This method should only be 50 // key states when the character is generated. This method should only be
51 // called when a key press is not handled by the input method but still 51 // called when a key press is not handled by the input method but still
52 // generates a character (eg. by the keyboard driver). In another word, the 52 // generates a character (eg. by the keyboard driver). In another word, the
53 // preceding key press event should not be a VKEY_PROCESSKEY. 53 // preceding key press event should not be a VKEY_PROCESSKEY.
54 // This method will be called whenever a char is generated by the keyboard, 54 // This method will be called whenever a char is generated by the keyboard,
55 // even if the current text input type is TEXT_INPUT_TYPE_NONE. 55 // even if the current text input type is TEXT_INPUT_TYPE_NONE.
56 virtual void InsertChar(char16 ch, int flags) = 0; 56 virtual void InsertChar(base::char16 ch, int flags) = 0;
57 57
58 // Input context information ------------------------------------------------- 58 // Input context information -------------------------------------------------
59 59
60 // Returns native window to which input context is bound. 60 // Returns native window to which input context is bound.
61 virtual gfx::NativeWindow GetAttachedWindow() const = 0; 61 virtual gfx::NativeWindow GetAttachedWindow() const = 0;
62 62
63 // Returns current text input type. It could be changed and even becomes 63 // Returns current text input type. It could be changed and even becomes
64 // TEXT_INPUT_TYPE_NONE at runtime. 64 // TEXT_INPUT_TYPE_NONE at runtime.
65 virtual ui::TextInputType GetTextInputType() const = 0; 65 virtual ui::TextInputType GetTextInputType() const = 0;
66 66
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // characters around current caret. This function with the range based on 114 // characters around current caret. This function with the range based on
115 // GetSelectionRange has a race condition due to asynchronous IPCs between 115 // GetSelectionRange has a race condition due to asynchronous IPCs between
116 // browser and renderer. 116 // browser and renderer.
117 // Returns false if the operation is not supported. 117 // Returns false if the operation is not supported.
118 virtual bool DeleteRange(const gfx::Range& range) = 0; 118 virtual bool DeleteRange(const gfx::Range& range) = 0;
119 119
120 // Retrieves the text content in a given UTF-16 based character range. 120 // Retrieves the text content in a given UTF-16 based character range.
121 // The result will be stored into |*text|. 121 // The result will be stored into |*text|.
122 // Returns false if the operation is not supported or the specified range 122 // Returns false if the operation is not supported or the specified range
123 // is out of the text range returned by GetTextRange(). 123 // is out of the text range returned by GetTextRange().
124 virtual bool GetTextFromRange( 124 virtual bool GetTextFromRange(const gfx::Range& range,
125 const gfx::Range& range, string16* text) const = 0; 125 base::string16* text) const = 0;
126 126
127 // Miscellaneous ------------------------------------------------------------ 127 // Miscellaneous ------------------------------------------------------------
128 128
129 // Called whenever current keyboard layout or input method is changed, 129 // Called whenever current keyboard layout or input method is changed,
130 // especially the change of input locale and text direction. 130 // especially the change of input locale and text direction.
131 virtual void OnInputMethodChanged() = 0; 131 virtual void OnInputMethodChanged() = 0;
132 132
133 // Called whenever the user requests to change the text direction and layout 133 // Called whenever the user requests to change the text direction and layout
134 // alignment of the current text box. It's for supporting ctrl-shift on 134 // alignment of the current text box. It's for supporting ctrl-shift on
135 // Windows. 135 // Windows.
(...skipping 16 matching lines...) Expand all
152 virtual void OnCandidateWindowShown() = 0; 152 virtual void OnCandidateWindowShown() = 0;
153 // Called when IME updates any appearance of the current candidate window. 153 // Called when IME updates any appearance of the current candidate window.
154 virtual void OnCandidateWindowUpdated() = 0; 154 virtual void OnCandidateWindowUpdated() = 0;
155 // Called when IME hides the candidate window. 155 // Called when IME hides the candidate window.
156 virtual void OnCandidateWindowHidden() = 0; 156 virtual void OnCandidateWindowHidden() = 0;
157 }; 157 };
158 158
159 } // namespace ui 159 } // namespace ui
160 160
161 #endif // UI_BASE_IME_TEXT_INPUT_CLIENT_H_ 161 #endif // UI_BASE_IME_TEXT_INPUT_CLIENT_H_
OLDNEW
« no previous file with comments | « ui/base/ime/composition_text.h ('k') | ui/base/l10n/l10n_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698