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

Side by Side Diff: ui/views/ime/input_method_win.h

Issue 17112021: New method: InputMethod::IsCandidatePopupOpen() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Synced. Created 7 years, 6 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
« no previous file with comments | « ui/views/ime/input_method_bridge.cc ('k') | ui/views/ime/input_method_win.cc » ('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) 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 UI_VIEWS_IME_INPUT_METHOD_WIN_H_ 5 #ifndef UI_VIEWS_IME_INPUT_METHOD_WIN_H_
6 #define UI_VIEWS_IME_INPUT_METHOD_WIN_H_ 6 #define UI_VIEWS_IME_INPUT_METHOD_WIN_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 26 matching lines...) Expand all
37 virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event, 37 virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event,
38 NativeEventResult* result) OVERRIDE; 38 NativeEventResult* result) OVERRIDE;
39 virtual void DispatchKeyEvent(const ui::KeyEvent& key) OVERRIDE; 39 virtual void DispatchKeyEvent(const ui::KeyEvent& key) OVERRIDE;
40 virtual void OnTextInputTypeChanged(View* view) OVERRIDE; 40 virtual void OnTextInputTypeChanged(View* view) OVERRIDE;
41 virtual void OnCaretBoundsChanged(View* view) OVERRIDE; 41 virtual void OnCaretBoundsChanged(View* view) OVERRIDE;
42 virtual void CancelComposition(View* view) OVERRIDE; 42 virtual void CancelComposition(View* view) OVERRIDE;
43 virtual void OnInputLocaleChanged() OVERRIDE; 43 virtual void OnInputLocaleChanged() OVERRIDE;
44 virtual std::string GetInputLocale() OVERRIDE; 44 virtual std::string GetInputLocale() OVERRIDE;
45 virtual base::i18n::TextDirection GetInputTextDirection() OVERRIDE; 45 virtual base::i18n::TextDirection GetInputTextDirection() OVERRIDE;
46 virtual bool IsActive() OVERRIDE; 46 virtual bool IsActive() OVERRIDE;
47 virtual bool IsCandidatePopupOpen() const OVERRIDE;
47 48
48 // Overridden from InputMethodBase. 49 // Overridden from InputMethodBase.
49 virtual ui::TextInputClient* GetTextInputClient() const OVERRIDE; 50 virtual ui::TextInputClient* GetTextInputClient() const OVERRIDE;
50 51
51 private: 52 private:
52 LRESULT OnImeSetContext( 53 LRESULT OnImeSetContext(
53 UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled); 54 UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled);
54 LRESULT OnImeStartComposition( 55 LRESULT OnImeStartComposition(
55 UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled); 56 UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled);
56 LRESULT OnImeComposition( 57 LRESULT OnImeComposition(
57 UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled); 58 UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled);
58 LRESULT OnImeEndComposition( 59 LRESULT OnImeEndComposition(
59 UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled); 60 UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled);
60 LRESULT OnImeRequest( 61 LRESULT OnImeRequest(
61 UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled); 62 UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled);
63 LRESULT OnImeNotify(
64 UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled);
62 // For both WM_CHAR and WM_SYSCHAR 65 // For both WM_CHAR and WM_SYSCHAR
63 LRESULT OnChar( 66 LRESULT OnChar(
64 UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled); 67 UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled);
65 // For both WM_DEADCHAR and WM_SYSDEADCHAR 68 // For both WM_DEADCHAR and WM_SYSDEADCHAR
66 LRESULT OnDeadChar( 69 LRESULT OnDeadChar(
67 UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled); 70 UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled);
68 71
69 LRESULT OnDocumentFeed(RECONVERTSTRING *reconv); 72 LRESULT OnDocumentFeed(RECONVERTSTRING *reconv);
70 LRESULT OnReconvertString(RECONVERTSTRING *reconv); 73 LRESULT OnReconvertString(RECONVERTSTRING *reconv);
71 LRESULT OnQueryCharPosition(IMECHARPOSITION *char_positon); 74 LRESULT OnQueryCharPosition(IMECHARPOSITION *char_positon);
72 75
73 // Overridden from InputMethodBase. 76 // Overridden from InputMethodBase.
74 virtual void OnWillChangeFocus(View* focused_before, View* focused) OVERRIDE; 77 virtual void OnWillChangeFocus(View* focused_before, View* focused) OVERRIDE;
75 virtual void OnDidChangeFocus(View* focused_before, View* focused) OVERRIDE; 78 virtual void OnDidChangeFocus(View* focused_before, View* focused) OVERRIDE;
76 79
77 // Asks the client to confirm current composition text. 80 // Asks the client to confirm current composition text.
78 void ConfirmCompositionText(); 81 void ConfirmCompositionText();
79 82
80 // Enables or disables the IME according to the current text input type. 83 // Enables or disables the IME according to the current text input type.
81 void UpdateIMEState(); 84 void UpdateIMEState();
82 85
83 // The HWND this InputMethod is bound to. 86 // The HWND this InputMethod is bound to.
84 HWND hwnd_; 87 HWND hwnd_;
85 88
86 // Indicates if the current input locale has an IME. 89 // Indicates if the current input locale has an IME.
87 bool active_; 90 bool active_;
88 91
92 // True if we know for sure that a candidate window is open.
93 bool is_candidate_popup_open_;
94
89 // Name of the current input locale. 95 // Name of the current input locale.
90 std::string locale_; 96 std::string locale_;
91 97
92 // The current input text direction. 98 // The current input text direction.
93 base::i18n::TextDirection direction_; 99 base::i18n::TextDirection direction_;
94 100
95 // The new text direction and layout alignment requested by the user by 101 // The new text direction and layout alignment requested by the user by
96 // pressing ctrl-shift. It'll be sent to the text input client when the key 102 // pressing ctrl-shift. It'll be sent to the text input client when the key
97 // is released. 103 // is released.
98 base::i18n::TextDirection pending_requested_direction_; 104 base::i18n::TextDirection pending_requested_direction_;
99 105
100 // Windows IMM32 wrapper. 106 // Windows IMM32 wrapper.
101 // (See "ui/base/win/ime_input.h" for its details.) 107 // (See "ui/base/win/ime_input.h" for its details.)
102 ui::ImeInput ime_input_; 108 ui::ImeInput ime_input_;
103 109
104 ui::InputMethod* const host_; 110 ui::InputMethod* const host_;
105 111
106 DISALLOW_COPY_AND_ASSIGN(InputMethodWin); 112 DISALLOW_COPY_AND_ASSIGN(InputMethodWin);
107 }; 113 };
108 114
109 } // namespace views 115 } // namespace views
110 116
111 #endif // UI_VIEWS_IME_INPUT_METHOD_WIN_H_ 117 #endif // UI_VIEWS_IME_INPUT_METHOD_WIN_H_
OLDNEW
« no previous file with comments | « ui/views/ime/input_method_bridge.cc ('k') | ui/views/ime/input_method_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698