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 "content/browser/renderer_host/render_widget_host_view_win.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_win.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <peninputpanel_i.c> | 8 #include <peninputpanel_i.c> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
899 } | 899 } |
900 | 900 |
901 void RenderWidgetHostViewWin::Blur() { | 901 void RenderWidgetHostViewWin::Blur() { |
902 NOTREACHED(); | 902 NOTREACHED(); |
903 } | 903 } |
904 | 904 |
905 bool RenderWidgetHostViewWin::HasFocus() const { | 905 bool RenderWidgetHostViewWin::HasFocus() const { |
906 return ::GetFocus() == m_hWnd; | 906 return ::GetFocus() == m_hWnd; |
907 } | 907 } |
908 | 908 |
| 909 bool RenderWidgetHostViewWin::IsSurfaceAvailableForCopy() const { |
| 910 return !!render_widget_host_->GetBackingStore(false) || |
| 911 !!accelerated_surface_.get(); |
| 912 } |
| 913 |
909 void RenderWidgetHostViewWin::Show() { | 914 void RenderWidgetHostViewWin::Show() { |
910 if (!is_fullscreen_) { | 915 if (!is_fullscreen_) { |
911 DCHECK(parent_hwnd_); | 916 DCHECK(parent_hwnd_); |
912 DCHECK(parent_hwnd_ != ui::GetWindowToParentTo(true)); | 917 DCHECK(parent_hwnd_ != ui::GetWindowToParentTo(true)); |
913 SetParent(parent_hwnd_); | 918 SetParent(parent_hwnd_); |
914 } | 919 } |
915 ShowWindow(SW_SHOW); | 920 ShowWindow(SW_SHOW); |
916 | 921 |
917 DidBecomeSelected(); | 922 DidBecomeSelected(); |
918 } | 923 } |
(...skipping 2086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3005 void RenderWidgetHostViewWin::ResetPointerDownContext() { | 3010 void RenderWidgetHostViewWin::ResetPointerDownContext() { |
3006 // If the default focus on the page is on an edit field and we did not | 3011 // If the default focus on the page is on an edit field and we did not |
3007 // receive a focus change in the context of a pointer down message, it means | 3012 // receive a focus change in the context of a pointer down message, it means |
3008 // that the pointer down message occurred on the edit field and we should | 3013 // that the pointer down message occurred on the edit field and we should |
3009 // display the on screen keyboard | 3014 // display the on screen keyboard |
3010 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) | 3015 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) |
3011 DisplayOnScreenKeyboardIfNeeded(); | 3016 DisplayOnScreenKeyboardIfNeeded(); |
3012 received_focus_change_after_pointer_down_ = false; | 3017 received_focus_change_after_pointer_down_ = false; |
3013 pointer_down_context_ = false; | 3018 pointer_down_context_ = false; |
3014 } | 3019 } |
OLD | NEW |