OLD | NEW |
1 // Copyright (c) 2010 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 #include "views/controls/textfield/native_textfield_win.h" | 5 #include "views/controls/textfield/native_textfield_win.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "app/l10n_util_win.h" | 10 #include "app/l10n_util_win.h" |
11 #include "app/win/win_util.h" | 11 #include "app/win/win_util.h" |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 HIMC imm_context = ImmGetContext(m_hWnd); | 298 HIMC imm_context = ImmGetContext(m_hWnd); |
299 if (!imm_context) | 299 if (!imm_context) |
300 return false; | 300 return false; |
301 | 301 |
302 const int composition_size = ImmGetCompositionString(imm_context, GCS_COMPSTR, | 302 const int composition_size = ImmGetCompositionString(imm_context, GCS_COMPSTR, |
303 NULL, 0); | 303 NULL, 0); |
304 ImmReleaseContext(m_hWnd, imm_context); | 304 ImmReleaseContext(m_hWnd, imm_context); |
305 return composition_size > 0; | 305 return composition_size > 0; |
306 } | 306 } |
307 | 307 |
| 308 void NativeTextfieldWin::GetSelectedRange(TextRange* range) const { |
| 309 NOTREACHED(); |
| 310 } |
| 311 |
| 312 void NativeTextfieldWin::SelectRange(const TextRange& range) { |
| 313 NOTREACHED(); |
| 314 } |
| 315 |
| 316 size_t NativeTextfieldWin::GetCursorPosition() const { |
| 317 NOTREACHED(); |
| 318 return 0U; |
| 319 } |
| 320 |
308 bool NativeTextfieldWin::HandleKeyPressed(const views::KeyEvent& e) { | 321 bool NativeTextfieldWin::HandleKeyPressed(const views::KeyEvent& e) { |
309 return false; | 322 return false; |
310 } | 323 } |
311 | 324 |
312 bool NativeTextfieldWin::HandleKeyReleased(const views::KeyEvent& e) { | 325 bool NativeTextfieldWin::HandleKeyReleased(const views::KeyEvent& e) { |
313 return false; | 326 return false; |
314 } | 327 } |
315 | 328 |
316 void NativeTextfieldWin::HandleWillGainFocus() { | 329 void NativeTextfieldWin::HandleWillGainFocus() { |
317 } | 330 } |
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1119 NativeTextfieldWrapper* NativeTextfieldWrapper::CreateWrapper( | 1132 NativeTextfieldWrapper* NativeTextfieldWrapper::CreateWrapper( |
1120 Textfield* field) { | 1133 Textfield* field) { |
1121 if (NativeTextfieldViews::IsTextfieldViewsEnabled()) { | 1134 if (NativeTextfieldViews::IsTextfieldViewsEnabled()) { |
1122 return new NativeTextfieldViews(field); | 1135 return new NativeTextfieldViews(field); |
1123 } else { | 1136 } else { |
1124 return new NativeTextfieldWin(field); | 1137 return new NativeTextfieldWin(field); |
1125 } | 1138 } |
1126 } | 1139 } |
1127 | 1140 |
1128 } // namespace views | 1141 } // namespace views |
OLD | NEW |