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/widget/desktop_aura/desktop_window_tree_host_win.h" | 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h" |
6 | 6 |
7 #include "base/win/metro.h" | 7 #include "base/win/metro.h" |
8 #include "third_party/skia/include/core/SkPath.h" | 8 #include "third_party/skia/include/core/SkPath.h" |
9 #include "third_party/skia/include/core/SkRegion.h" | 9 #include "third_party/skia/include/core/SkRegion.h" |
10 #include "ui/aura/client/aura_constants.h" | 10 #include "ui/aura/client/aura_constants.h" |
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
812 OnHostResized(new_size); | 812 OnHostResized(new_size); |
813 } | 813 } |
814 | 814 |
815 void DesktopWindowTreeHostWin::HandleFrameChanged() { | 815 void DesktopWindowTreeHostWin::HandleFrameChanged() { |
816 SetWindowTransparency(); | 816 SetWindowTransparency(); |
817 // Replace the frame and layout the contents. | 817 // Replace the frame and layout the contents. |
818 GetWidget()->non_client_view()->UpdateFrame(); | 818 GetWidget()->non_client_view()->UpdateFrame(); |
819 } | 819 } |
820 | 820 |
821 void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) { | 821 void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) { |
822 // TODO(beng): inform the native_widget_delegate_. | 822 // TODO(beng): inform the native_widget_delegate_. |
sky
2015/05/22 17:29:02
I think it's worth a comment here as to why you do
Shu Chen
2015/05/25 01:14:25
Thanks for your comment. My later cl soon to refac
| |
823 InputMethod* input_method = GetInputMethod(); | |
824 if (input_method) | |
825 input_method->OnFocus(); | |
826 } | 823 } |
827 | 824 |
828 void DesktopWindowTreeHostWin::HandleNativeBlur(HWND focused_window) { | 825 void DesktopWindowTreeHostWin::HandleNativeBlur(HWND focused_window) { |
829 // TODO(beng): inform the native_widget_delegate_. | 826 // TODO(beng): inform the native_widget_delegate_. |
830 InputMethod* input_method = GetInputMethod(); | |
831 if (input_method) | |
832 input_method->OnBlur(); | |
833 } | 827 } |
sadrul
2015/05/16 02:24:25
The X11 version seems to still do this (e.g. Deskt
Shu Chen
2015/05/20 06:30:52
Let's limit the scope of this change in Windows pl
| |
834 | 828 |
835 bool DesktopWindowTreeHostWin::HandleMouseEvent(const ui::MouseEvent& event) { | 829 bool DesktopWindowTreeHostWin::HandleMouseEvent(const ui::MouseEvent& event) { |
836 SendEventToProcessor(const_cast<ui::MouseEvent*>(&event)); | 830 SendEventToProcessor(const_cast<ui::MouseEvent*>(&event)); |
837 return event.handled(); | 831 return event.handled(); |
838 } | 832 } |
839 | 833 |
840 bool DesktopWindowTreeHostWin::HandleKeyEvent(const ui::KeyEvent& event) { | 834 bool DesktopWindowTreeHostWin::HandleKeyEvent(const ui::KeyEvent& event) { |
841 return false; | 835 return false; |
842 } | 836 } |
843 | 837 |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
992 | 986 |
993 // static | 987 // static |
994 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( | 988 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( |
995 internal::NativeWidgetDelegate* native_widget_delegate, | 989 internal::NativeWidgetDelegate* native_widget_delegate, |
996 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 990 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
997 return new DesktopWindowTreeHostWin(native_widget_delegate, | 991 return new DesktopWindowTreeHostWin(native_widget_delegate, |
998 desktop_native_widget_aura); | 992 desktop_native_widget_aura); |
999 } | 993 } |
1000 | 994 |
1001 } // namespace views | 995 } // namespace views |
OLD | NEW |