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

Side by Side Diff: ui/views/widget/native_widget_win.cc

Issue 23245012: Fix Views Combobox and Tree View text input. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address nit. Created 7 years, 3 months 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 | Annotate | Revision Log
« no previous file with comments | « ui/views/widget/native_widget_aura.cc ('k') | 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/widget/native_widget_win.h" 5 #include "ui/views/widget/native_widget_win.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 delegate_->OnNativeWidgetSizeChanged(size_in_dip); 730 delegate_->OnNativeWidgetSizeChanged(size_in_dip);
731 } 731 }
732 732
733 void NativeWidgetWin::HandleFrameChanged() { 733 void NativeWidgetWin::HandleFrameChanged() {
734 // Replace the frame and layout the contents. 734 // Replace the frame and layout the contents.
735 GetWidget()->non_client_view()->UpdateFrame(true); 735 GetWidget()->non_client_view()->UpdateFrame(true);
736 } 736 }
737 737
738 void NativeWidgetWin::HandleNativeFocus(HWND last_focused_window) { 738 void NativeWidgetWin::HandleNativeFocus(HWND last_focused_window) {
739 delegate_->OnNativeFocus(last_focused_window); 739 delegate_->OnNativeFocus(last_focused_window);
740 InputMethod* input_method = GetInputMethod();
741 if (input_method)
742 input_method->OnFocus();
743 } 740 }
744 741
745 void NativeWidgetWin::HandleNativeBlur(HWND focused_window) { 742 void NativeWidgetWin::HandleNativeBlur(HWND focused_window) {
746 delegate_->OnNativeBlur(focused_window); 743 delegate_->OnNativeBlur(focused_window);
747 InputMethod* input_method = GetInputMethod();
748 if (input_method)
749 input_method->OnBlur();
750 } 744 }
751 745
752 bool NativeWidgetWin::HandleMouseEvent(const ui::MouseEvent& event) { 746 bool NativeWidgetWin::HandleMouseEvent(const ui::MouseEvent& event) {
753 static gfx::Transform scale_transform( 747 static gfx::Transform scale_transform(
754 1/ui::win::GetDeviceScaleFactor(), 0.0, 748 1/ui::win::GetDeviceScaleFactor(), 0.0,
755 0.0, 1/ui::win::GetDeviceScaleFactor(), 749 0.0, 1/ui::win::GetDeviceScaleFactor(),
756 0.0, 0.0); 750 0.0, 0.0);
757 if (event.IsMouseWheelEvent()) { 751 if (event.IsMouseWheelEvent()) {
758 ui::MouseWheelEvent dpi_event( 752 ui::MouseWheelEvent dpi_event(
759 static_cast<const ui::MouseWheelEvent&>(event)); 753 static_cast<const ui::MouseWheelEvent&>(event));
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1035 // static 1029 // static
1036 bool NativeWidgetPrivate::IsTouchDown() { 1030 bool NativeWidgetPrivate::IsTouchDown() {
1037 // This currently isn't necessary because we're not generating touch events on 1031 // This currently isn't necessary because we're not generating touch events on
1038 // windows. When we do, this will need to be updated. 1032 // windows. When we do, this will need to be updated.
1039 return false; 1033 return false;
1040 } 1034 }
1041 1035
1042 } // namespace internal 1036 } // namespace internal
1043 1037
1044 } // namespace views 1038 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_aura.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698