Index: ui/views/controls/textfield/native_textfield_win.cc |
diff --git a/ui/views/controls/textfield/native_textfield_win.cc b/ui/views/controls/textfield/native_textfield_win.cc |
index c35b89c4fce3032c38157ff9f3f319f114abb62d..18dfbde49885dccb193f74f3970547002355fe07 100644 |
--- a/ui/views/controls/textfield/native_textfield_win.cc |
+++ b/ui/views/controls/textfield/native_textfield_win.cc |
@@ -6,6 +6,7 @@ |
#include <algorithm> |
+#include "base/command_line.h" |
oshima
2012/06/07 21:11:41
do you need this?
msw
2012/06/07 21:43:37
Removed, thanks for catching that!
|
#include "base/i18n/case_conversion.h" |
#include "base/i18n/rtl.h" |
#include "base/string_util.h" |
@@ -17,19 +18,18 @@ |
#include "ui/base/accessibility/accessible_view_state.h" |
#include "ui/base/clipboard/clipboard.h" |
#include "ui/base/clipboard/scoped_clipboard_writer.h" |
-#include "ui/base/keycodes/keyboard_code_conversion_win.h" |
#include "ui/base/keycodes/keyboard_codes.h" |
#include "ui/base/l10n/l10n_util.h" |
#include "ui/base/l10n/l10n_util_win.h" |
#include "ui/base/native_theme/native_theme_win.h" |
#include "ui/base/range/range.h" |
+#include "ui/base/ui_base_switches.h" |
oshima
2012/06/07 21:11:41
ditto
msw
2012/06/07 21:43:37
Done.
|
#include "ui/base/win/mouse_wheel_util.h" |
#include "ui/views/controls/label.h" |
#include "ui/views/controls/menu/menu_item_view.h" |
#include "ui/views/controls/menu/menu_model_adapter.h" |
#include "ui/views/controls/menu/menu_runner.h" |
#include "ui/views/controls/native/native_view_host.h" |
-#include "ui/views/controls/textfield/native_textfield_views.h" |
#include "ui/views/controls/textfield/textfield.h" |
#include "ui/views/controls/textfield/textfield_controller.h" |
#include "ui/views/focus/focus_manager.h" |
@@ -152,25 +152,6 @@ bool NativeTextfieldWin::IsDoubleClick(const POINT& origin, |
(abs(current.y - origin.y) <= (GetSystemMetrics(SM_CYDOUBLECLK) / 2)); |
} |
-// static |
-bool NativeTextfieldWin::IsNumPadDigit(int key_code, bool extended_key) { |
- if (key_code >= VK_NUMPAD0 && key_code <= VK_NUMPAD9) |
- return true; |
- |
- // Check for num pad keys without NumLock. |
- // Note: there is no easy way to know if a the key that was pressed comes from |
- // the num pad or the rest of the keyboard. Investigating how |
- // TranslateMessage() generates the WM_KEYCHAR from an |
- // ALT + <NumPad sequences> it appears it looks at the extended key flag |
- // (which is on if the key pressed comes from one of the 3 clusters to |
- // the left of the numeric keypad). So we use it as well. |
- return !extended_key && |
- ((key_code >= VK_PRIOR && key_code <= VK_DOWN) || // All keys but 5 |
- // and 0. |
- (key_code == VK_CLEAR) || // Key 5. |
- (key_code == VK_INSERT)); // Key 0. |
-} |
- |
void NativeTextfieldWin::AttachHack() { |
// See the code in textfield.cc that calls this for why this is here. |
container_view_->set_focus_view(textfield_); |
@@ -1206,17 +1187,4 @@ void NativeTextfieldWin::BuildContextMenu() { |
IDS_APP_SELECT_ALL); |
} |
-//////////////////////////////////////////////////////////////////////////////// |
-// NativeTextfieldWrapper, public: |
- |
-// static |
-NativeTextfieldWrapper* NativeTextfieldWrapper::CreateWrapper( |
- Textfield* field) { |
-#if defined(USE_AURA) |
- return new NativeTextfieldViews(field); |
-#else |
- return new NativeTextfieldWin(field); |
-#endif |
-} |
- |
} // namespace views |