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 2119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2130 for (size_t i = 0; i < plugin_windows.size(); ++i) { | 2130 for (size_t i = 0; i < plugin_windows.size(); ++i) { |
2131 HWND next; | 2131 HWND next; |
2132 if (i + 1 < plugin_windows.size()) | 2132 if (i + 1 < plugin_windows.size()) |
2133 next = plugin_windows[i+1]; | 2133 next = plugin_windows[i+1]; |
2134 else | 2134 else |
2135 next = compositor_host_window_; | 2135 next = compositor_host_window_; |
2136 ::SetWindowPos(plugin_windows[i], next, 0, 0, 0, 0, | 2136 ::SetWindowPos(plugin_windows[i], next, 0, 0, 0, 0, |
2137 SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); | 2137 SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); |
2138 } | 2138 } |
2139 } else { | 2139 } else { |
| 2140 // Drop the backing store for the accelerated surface when the accelerated |
| 2141 // compositor is disabled. Otherwise, a flash of the last presented frame |
| 2142 // could appear when it is next enabled. |
| 2143 if (accelerated_surface_.get()) |
| 2144 accelerated_surface_->Suspend(); |
2140 hide_compositor_window_at_next_paint_ = true; | 2145 hide_compositor_window_at_next_paint_ = true; |
2141 } | 2146 } |
2142 } | 2147 } |
2143 | 2148 |
2144 void RenderWidgetHostViewWin::AcceleratedSurfaceBuffersSwapped( | 2149 void RenderWidgetHostViewWin::AcceleratedSurfaceBuffersSwapped( |
2145 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, | 2150 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, |
2146 int gpu_host_id) { | 2151 int gpu_host_id) { |
2147 NOTREACHED(); | 2152 NOTREACHED(); |
2148 } | 2153 } |
2149 | 2154 |
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2599 void RenderWidgetHostViewWin::ResetPointerDownContext() { | 2604 void RenderWidgetHostViewWin::ResetPointerDownContext() { |
2600 // If the default focus on the page is on an edit field and we did not | 2605 // If the default focus on the page is on an edit field and we did not |
2601 // receive a focus change in the context of a pointer down message, it means | 2606 // receive a focus change in the context of a pointer down message, it means |
2602 // that the pointer down message occurred on the edit field and we should | 2607 // that the pointer down message occurred on the edit field and we should |
2603 // display the on screen keyboard | 2608 // display the on screen keyboard |
2604 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) | 2609 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) |
2605 DisplayOnScreenKeyboardIfNeeded(); | 2610 DisplayOnScreenKeyboardIfNeeded(); |
2606 received_focus_change_after_pointer_down_ = false; | 2611 received_focus_change_after_pointer_down_ = false; |
2607 pointer_down_context_ = false; | 2612 pointer_down_context_ = false; |
2608 } | 2613 } |
OLD | NEW |