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 "ui/views/controls/textfield/native_textfield_win.h" | 5 #include "ui/views/controls/textfield/native_textfield_win.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/i18n/case_conversion.h" | 9 #include "base/i18n/case_conversion.h" |
10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
(...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1060 DefWindowProc(); | 1060 DefWindowProc(); |
1061 | 1061 |
1062 // Document manager created by RichEdit can be obtained only after | 1062 // Document manager created by RichEdit can be obtained only after |
1063 // WM_SET_FOCUS event is handled. | 1063 // WM_SET_FOCUS event is handled. |
1064 tsf_event_router_->SetManager( | 1064 tsf_event_router_->SetManager( |
1065 ui::TsfBridge::GetInstance()->GetThreadManager()); | 1065 ui::TsfBridge::GetInstance()->GetThreadManager()); |
1066 SetMsgHandled(TRUE); | 1066 SetMsgHandled(TRUE); |
1067 } | 1067 } |
1068 | 1068 |
1069 void NativeTextfieldWin::OnKillFocus(HWND hwnd) { | 1069 void NativeTextfieldWin::OnKillFocus(HWND hwnd) { |
1070 SetMsgHandled(FALSE); | |
sky
2012/11/01 16:00:37
Move this to the end like we do else where.
Seigo Nonaka
2012/11/02 02:11:37
Done.
| |
1070 if(tsf_event_router_) | 1071 if(tsf_event_router_) |
1071 tsf_event_router_->SetManager(NULL); | 1072 tsf_event_router_->SetManager(NULL); |
1072 } | 1073 } |
1073 | 1074 |
1074 void NativeTextfieldWin::OnSysChar(TCHAR ch, UINT repeat_count, UINT flags) { | 1075 void NativeTextfieldWin::OnSysChar(TCHAR ch, UINT repeat_count, UINT flags) { |
1075 // Nearly all alt-<xxx> combos result in beeping rather than doing something | 1076 // Nearly all alt-<xxx> combos result in beeping rather than doing something |
1076 // useful, so we discard most. Exceptions: | 1077 // useful, so we discard most. Exceptions: |
1077 // * ctrl-alt-<xxx>, which is sometimes important, generates WM_CHAR instead | 1078 // * ctrl-alt-<xxx>, which is sometimes important, generates WM_CHAR instead |
1078 // of WM_SYSCHAR, so it doesn't need to be handled here. | 1079 // of WM_SYSCHAR, so it doesn't need to be handled here. |
1079 // * alt-space gets translated by the default WM_SYSCHAR handler to a | 1080 // * alt-space gets translated by the default WM_SYSCHAR handler to a |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1274 context_menu_contents_->AddSeparator(ui::NORMAL_SEPARATOR); | 1275 context_menu_contents_->AddSeparator(ui::NORMAL_SEPARATOR); |
1275 context_menu_contents_->AddItemWithStringId(IDS_APP_CUT, IDS_APP_CUT); | 1276 context_menu_contents_->AddItemWithStringId(IDS_APP_CUT, IDS_APP_CUT); |
1276 context_menu_contents_->AddItemWithStringId(IDS_APP_COPY, IDS_APP_COPY); | 1277 context_menu_contents_->AddItemWithStringId(IDS_APP_COPY, IDS_APP_COPY); |
1277 context_menu_contents_->AddItemWithStringId(IDS_APP_PASTE, IDS_APP_PASTE); | 1278 context_menu_contents_->AddItemWithStringId(IDS_APP_PASTE, IDS_APP_PASTE); |
1278 context_menu_contents_->AddSeparator(ui::NORMAL_SEPARATOR); | 1279 context_menu_contents_->AddSeparator(ui::NORMAL_SEPARATOR); |
1279 context_menu_contents_->AddItemWithStringId(IDS_APP_SELECT_ALL, | 1280 context_menu_contents_->AddItemWithStringId(IDS_APP_SELECT_ALL, |
1280 IDS_APP_SELECT_ALL); | 1281 IDS_APP_SELECT_ALL); |
1281 } | 1282 } |
1282 | 1283 |
1283 } // namespace views | 1284 } // namespace views |
OLD | NEW |