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 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
656 } | 656 } |
657 | 657 |
658 void RenderWidgetHostViewWin::Blur() { | 658 void RenderWidgetHostViewWin::Blur() { |
659 NOTREACHED(); | 659 NOTREACHED(); |
660 } | 660 } |
661 | 661 |
662 bool RenderWidgetHostViewWin::HasFocus() const { | 662 bool RenderWidgetHostViewWin::HasFocus() const { |
663 return ::GetFocus() == m_hWnd; | 663 return ::GetFocus() == m_hWnd; |
664 } | 664 } |
665 | 665 |
| 666 bool RenderWidgetHostViewWin::IsSurfaceAvailableForCopy() const { |
| 667 return !!render_widget_host_->GetBackingStore(false) || |
| 668 !!accelerated_surface_.get(); |
| 669 } |
| 670 |
666 void RenderWidgetHostViewWin::Show() { | 671 void RenderWidgetHostViewWin::Show() { |
667 if (!is_fullscreen_) { | 672 if (!is_fullscreen_) { |
668 DCHECK(parent_hwnd_); | 673 DCHECK(parent_hwnd_); |
669 DCHECK(parent_hwnd_ != ui::GetWindowToParentTo(true)); | 674 DCHECK(parent_hwnd_ != ui::GetWindowToParentTo(true)); |
670 SetParent(parent_hwnd_); | 675 SetParent(parent_hwnd_); |
671 } | 676 } |
672 ShowWindow(SW_SHOW); | 677 ShowWindow(SW_SHOW); |
673 | 678 |
674 DidBecomeSelected(); | 679 DidBecomeSelected(); |
675 } | 680 } |
(...skipping 2021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2697 void RenderWidgetHostViewWin::ResetPointerDownContext() { | 2702 void RenderWidgetHostViewWin::ResetPointerDownContext() { |
2698 // If the default focus on the page is on an edit field and we did not | 2703 // If the default focus on the page is on an edit field and we did not |
2699 // receive a focus change in the context of a pointer down message, it means | 2704 // receive a focus change in the context of a pointer down message, it means |
2700 // that the pointer down message occurred on the edit field and we should | 2705 // that the pointer down message occurred on the edit field and we should |
2701 // display the on screen keyboard | 2706 // display the on screen keyboard |
2702 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) | 2707 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) |
2703 DisplayOnScreenKeyboardIfNeeded(); | 2708 DisplayOnScreenKeyboardIfNeeded(); |
2704 received_focus_change_after_pointer_down_ = false; | 2709 received_focus_change_after_pointer_down_ = false; |
2705 pointer_down_context_ = false; | 2710 pointer_down_context_ = false; |
2706 } | 2711 } |
OLD | NEW |