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