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

Side by Side Diff: ui/views/controls/textfield/native_textfield_win.cc

Issue 11365028: Calls default window procedure for WM_KILLFOCUS. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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 | « no previous file | no next file » | 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) 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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698