| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "app/l10n_util.h" | 5 #include "app/l10n_util.h" |
| 6 #include "app/l10n_util_win.h" | 6 #include "app/l10n_util_win.h" |
| 7 #include "app/win_util.h" | 7 #include "app/win_util.h" |
| 8 #include "base/clipboard.h" | 8 #include "base/clipboard.h" |
| 9 #include "base/gfx/native_theme.h" | 9 #include "base/gfx/native_theme.h" |
| 10 #include "base/scoped_clipboard_writer.h" | 10 #include "base/scoped_clipboard_writer.h" |
| (...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 // Force a Paste operation to trigger OnContentsChanged, even if identical | 674 // Force a Paste operation to trigger OnContentsChanged, even if identical |
| 675 // contents are pasted into the text box. | 675 // contents are pasted into the text box. |
| 676 text_before_change_.clear(); | 676 text_before_change_.clear(); |
| 677 ReplaceSel(collapsed.c_str(), true); | 677 ReplaceSel(collapsed.c_str(), true); |
| 678 } | 678 } |
| 679 } | 679 } |
| 680 | 680 |
| 681 void NativeTextfieldWin::OnSetFocus(HWND hwnd) { | 681 void NativeTextfieldWin::OnSetFocus(HWND hwnd) { |
| 682 SetMsgHandled(FALSE); // We still want the default processing of the message. | 682 SetMsgHandled(FALSE); // We still want the default processing of the message. |
| 683 | 683 |
| 684 views::FocusManager* focus_manager = textfield_->GetFocusManager(); | 684 views::FocusManager* focus_manager = |
| 685 views::FocusManager::GetFocusManager(m_hWnd); |
| 685 if (!focus_manager) { | 686 if (!focus_manager) { |
| 686 NOTREACHED(); | 687 NOTREACHED(); |
| 687 return; | 688 return; |
| 688 } | 689 } |
| 689 focus_manager->SetFocusedView(textfield_); | 690 focus_manager->SetFocusedView(textfield_); |
| 690 } | 691 } |
| 691 | 692 |
| 692 void NativeTextfieldWin::OnSysChar(TCHAR ch, UINT repeat_count, UINT flags) { | 693 void NativeTextfieldWin::OnSysChar(TCHAR ch, UINT repeat_count, UINT flags) { |
| 693 // Nearly all alt-<xxx> combos result in beeping rather than doing something | 694 // Nearly all alt-<xxx> combos result in beeping rather than doing something |
| 694 // useful, so we discard most. Exceptions: | 695 // useful, so we discard most. Exceptions: |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 864 //////////////////////////////////////////////////////////////////////////////// | 865 //////////////////////////////////////////////////////////////////////////////// |
| 865 // NativeTextfieldWrapper, public: | 866 // NativeTextfieldWrapper, public: |
| 866 | 867 |
| 867 // static | 868 // static |
| 868 NativeTextfieldWrapper* NativeTextfieldWrapper::CreateWrapper( | 869 NativeTextfieldWrapper* NativeTextfieldWrapper::CreateWrapper( |
| 869 Textfield* field) { | 870 Textfield* field) { |
| 870 return new NativeTextfieldWin(field); | 871 return new NativeTextfieldWin(field); |
| 871 } | 872 } |
| 872 | 873 |
| 873 } // namespace views | 874 } // namespace views |
| OLD | NEW |