| 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 2064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2075 SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); | 2075 SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); |
| 2076 } | 2076 } |
| 2077 } else { | 2077 } else { |
| 2078 hide_compositor_window_at_next_paint_ = true; | 2078 hide_compositor_window_at_next_paint_ = true; |
| 2079 } | 2079 } |
| 2080 } | 2080 } |
| 2081 | 2081 |
| 2082 void RenderWidgetHostViewWin::AcceleratedSurfaceBuffersSwapped( | 2082 void RenderWidgetHostViewWin::AcceleratedSurfaceBuffersSwapped( |
| 2083 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, | 2083 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, |
| 2084 int gpu_host_id) { | 2084 int gpu_host_id) { |
| 2085 if (params.surface_id) { | 2085 if (params.surface_handle) { |
| 2086 if (!accelerated_surface_.get() && compositor_host_window_) { | 2086 if (!accelerated_surface_.get() && compositor_host_window_) { |
| 2087 accelerated_surface_.reset(new AcceleratedSurface); | 2087 accelerated_surface_.reset(new AcceleratedSurface); |
| 2088 } | 2088 } |
| 2089 | 2089 |
| 2090 scoped_ptr<IPC::Message> message( | 2090 scoped_ptr<IPC::Message> message( |
| 2091 new AcceleratedSurfaceMsg_BuffersSwappedACK(params.route_id)); | 2091 new AcceleratedSurfaceMsg_BuffersSwappedACK(params.route_id)); |
| 2092 base::Closure acknowledge_task = base::Bind( | 2092 base::Closure acknowledge_task = base::Bind( |
| 2093 SendToGpuProcessHost, | 2093 SendToGpuProcessHost, |
| 2094 gpu_host_id, | 2094 gpu_host_id, |
| 2095 base::Passed(&message)); | 2095 base::Passed(&message)); |
| 2096 | 2096 |
| 2097 accelerated_surface_->AsyncPresentAndAcknowledge( | 2097 accelerated_surface_->AsyncPresentAndAcknowledge( |
| 2098 compositor_host_window_, | 2098 compositor_host_window_, |
| 2099 params.size, | 2099 params.size, |
| 2100 params.surface_id, | 2100 params.surface_handle, |
| 2101 base::Bind(PostTaskOnIOThread, | 2101 base::Bind(PostTaskOnIOThread, |
| 2102 FROM_HERE, | 2102 FROM_HERE, |
| 2103 acknowledge_task)); | 2103 acknowledge_task)); |
| 2104 } else { | 2104 } else { |
| 2105 RenderWidgetHost::AcknowledgeSwapBuffers(params.route_id, gpu_host_id); | 2105 RenderWidgetHost::AcknowledgeSwapBuffers(params.route_id, gpu_host_id); |
| 2106 } | 2106 } |
| 2107 } | 2107 } |
| 2108 | 2108 |
| 2109 void RenderWidgetHostViewWin::AcceleratedSurfacePostSubBuffer( | 2109 void RenderWidgetHostViewWin::AcceleratedSurfacePostSubBuffer( |
| 2110 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, | 2110 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2569 void RenderWidgetHostViewWin::ResetPointerDownContext() { | 2569 void RenderWidgetHostViewWin::ResetPointerDownContext() { |
| 2570 // If the default focus on the page is on an edit field and we did not | 2570 // If the default focus on the page is on an edit field and we did not |
| 2571 // receive a focus change in the context of a pointer down message, it means | 2571 // receive a focus change in the context of a pointer down message, it means |
| 2572 // that the pointer down message occurred on the edit field and we should | 2572 // that the pointer down message occurred on the edit field and we should |
| 2573 // display the on screen keyboard | 2573 // display the on screen keyboard |
| 2574 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) | 2574 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) |
| 2575 DisplayOnScreenKeyboardIfNeeded(); | 2575 DisplayOnScreenKeyboardIfNeeded(); |
| 2576 received_focus_change_after_pointer_down_ = false; | 2576 received_focus_change_after_pointer_down_ = false; |
| 2577 pointer_down_context_ = false; | 2577 pointer_down_context_ = false; |
| 2578 } | 2578 } |
| OLD | NEW |