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 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
901 BackingStore* RenderWidgetHostViewWin::AllocBackingStore( | 901 BackingStore* RenderWidgetHostViewWin::AllocBackingStore( |
902 const gfx::Size& size) { | 902 const gfx::Size& size) { |
903 return new BackingStoreWin(render_widget_host_, size); | 903 return new BackingStoreWin(render_widget_host_, size); |
904 } | 904 } |
905 | 905 |
906 void RenderWidgetHostViewWin::SetBackground(const SkBitmap& background) { | 906 void RenderWidgetHostViewWin::SetBackground(const SkBitmap& background) { |
907 content::RenderWidgetHostViewBase::SetBackground(background); | 907 content::RenderWidgetHostViewBase::SetBackground(background); |
908 render_widget_host_->SetBackground(background); | 908 render_widget_host_->SetBackground(background); |
909 } | 909 } |
910 | 910 |
| 911 bool RenderWidgetHostViewWin::CopyFromCompositingSurface( |
| 912 const gfx::Size& size, |
| 913 skia::PlatformCanvas* output) { |
| 914 if (!accelerated_surface_.get()) |
| 915 return false; |
| 916 |
| 917 if (size.IsEmpty()) |
| 918 return false; |
| 919 |
| 920 if (!output->initialize(size.width(), size.height(), true)) |
| 921 return false; |
| 922 |
| 923 return accelerated_surface_->CopyTo( |
| 924 size, output->getTopDevice()->accessBitmap(true).getPixels()); |
| 925 } |
| 926 |
911 void RenderWidgetHostViewWin::UnhandledWheelEvent( | 927 void RenderWidgetHostViewWin::UnhandledWheelEvent( |
912 const WebKit::WebMouseWheelEvent& event) { | 928 const WebKit::WebMouseWheelEvent& event) { |
913 } | 929 } |
914 | 930 |
915 void RenderWidgetHostViewWin::ProcessTouchAck( | 931 void RenderWidgetHostViewWin::ProcessTouchAck( |
916 WebKit::WebInputEvent::Type type, bool processed) { | 932 WebKit::WebInputEvent::Type type, bool processed) { |
917 if (type == WebKit::WebInputEvent::TouchStart) | 933 if (type == WebKit::WebInputEvent::TouchStart) |
918 UpdateDesiredTouchMode(processed); | 934 UpdateDesiredTouchMode(processed); |
919 } | 935 } |
920 | 936 |
(...skipping 1736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2657 void RenderWidgetHostViewWin::ResetPointerDownContext() { | 2673 void RenderWidgetHostViewWin::ResetPointerDownContext() { |
2658 // If the default focus on the page is on an edit field and we did not | 2674 // If the default focus on the page is on an edit field and we did not |
2659 // receive a focus change in the context of a pointer down message, it means | 2675 // receive a focus change in the context of a pointer down message, it means |
2660 // that the pointer down message occurred on the edit field and we should | 2676 // that the pointer down message occurred on the edit field and we should |
2661 // display the on screen keyboard | 2677 // display the on screen keyboard |
2662 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) | 2678 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) |
2663 DisplayOnScreenKeyboardIfNeeded(); | 2679 DisplayOnScreenKeyboardIfNeeded(); |
2664 received_focus_change_after_pointer_down_ = false; | 2680 received_focus_change_after_pointer_down_ = false; |
2665 pointer_down_context_ = false; | 2681 pointer_down_context_ = false; |
2666 } | 2682 } |
OLD | NEW |