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 #include "content/child/npapi/webplugin_ime_win.h" | 5 #include "content/child/npapi/webplugin_ime_win.h" |
6 | 6 |
7 #include <cstring> | 7 #include <cstring> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 { "ImmAssociateContextEx", | 162 { "ImmAssociateContextEx", |
163 reinterpret_cast<FARPROC>(ImmAssociateContextEx) }, | 163 reinterpret_cast<FARPROC>(ImmAssociateContextEx) }, |
164 { "ImmGetCompositionStringW", | 164 { "ImmGetCompositionStringW", |
165 reinterpret_cast<FARPROC>(ImmGetCompositionStringW) }, | 165 reinterpret_cast<FARPROC>(ImmGetCompositionStringW) }, |
166 { "ImmGetContext", reinterpret_cast<FARPROC>(ImmGetContext) }, | 166 { "ImmGetContext", reinterpret_cast<FARPROC>(ImmGetContext) }, |
167 { "ImmReleaseContext", reinterpret_cast<FARPROC>(ImmReleaseContext) }, | 167 { "ImmReleaseContext", reinterpret_cast<FARPROC>(ImmReleaseContext) }, |
168 { "ImmSetCandidateWindow", | 168 { "ImmSetCandidateWindow", |
169 reinterpret_cast<FARPROC>(ImmSetCandidateWindow) }, | 169 reinterpret_cast<FARPROC>(ImmSetCandidateWindow) }, |
170 { "ImmSetOpenStatus", reinterpret_cast<FARPROC>(ImmSetOpenStatus) }, | 170 { "ImmSetOpenStatus", reinterpret_cast<FARPROC>(ImmSetOpenStatus) }, |
171 }; | 171 }; |
172 for (int i = 0; i < arraysize(kImm32Functions); ++i) { | 172 for (size_t i = 0; i < arraysize(kImm32Functions); ++i) { |
173 if (!lstrcmpiA(name, kImm32Functions[i].name)) | 173 if (!lstrcmpiA(name, kImm32Functions[i].name)) |
174 return kImm32Functions[i].function; | 174 return kImm32Functions[i].function; |
175 } | 175 } |
176 return NULL; | 176 return NULL; |
177 } | 177 } |
178 | 178 |
179 void WebPluginIMEWin::Lock() { | 179 void WebPluginIMEWin::Lock() { |
180 g_webplugin_ime_lock.Pointer()->Acquire(); | 180 g_webplugin_ime_lock.Pointer()->Acquire(); |
181 instance_ = this; | 181 instance_ = this; |
182 } | 182 } |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 int input_type = open ? 1 : 0; | 314 int input_type = open ? 1 : 0; |
315 if (instance->input_type_ != input_type) { | 315 if (instance->input_type_ != input_type) { |
316 instance->input_type_ = input_type; | 316 instance->input_type_ = input_type; |
317 instance->status_updated_ = true; | 317 instance->status_updated_ = true; |
318 } | 318 } |
319 | 319 |
320 return TRUE; | 320 return TRUE; |
321 } | 321 } |
322 | 322 |
323 } // namespace content | 323 } // namespace content |
OLD | NEW |