| 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 <map> | 8 #include <map> |
| 9 #include <peninputpanel_i.c> | 9 #include <peninputpanel_i.c> |
| 10 #include <stack> | 10 #include <stack> |
| (...skipping 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1365 // as they have plugin instances active. Quicktime crashes in this case | 1365 // as they have plugin instances active. Quicktime crashes in this case |
| 1366 // because its windowing code cleans up an internal data structure that the | 1366 // because its windowing code cleans up an internal data structure that the |
| 1367 // handler for NPP_DestroyStream relies on. | 1367 // handler for NPP_DestroyStream relies on. |
| 1368 // | 1368 // |
| 1369 // The fix is to detach plugin windows from web contents when it is going | 1369 // The fix is to detach plugin windows from web contents when it is going |
| 1370 // away. This will prevent the plugin windows from getting destroyed | 1370 // away. This will prevent the plugin windows from getting destroyed |
| 1371 // automatically. The detached plugin windows will get cleaned up in proper | 1371 // automatically. The detached plugin windows will get cleaned up in proper |
| 1372 // sequence as part of the usual cleanup when the plugin instance goes away. | 1372 // sequence as part of the usual cleanup when the plugin instance goes away. |
| 1373 EnumChildWindows(m_hWnd, DetachPluginWindowsCallback, NULL); | 1373 EnumChildWindows(m_hWnd, DetachPluginWindowsCallback, NULL); |
| 1374 | 1374 |
| 1375 props_.reset(); | 1375 props_.clear(); |
| 1376 | 1376 |
| 1377 if (base::win::GetVersion() >= base::win::VERSION_WIN7 && | 1377 if (base::win::GetVersion() >= base::win::VERSION_WIN7 && |
| 1378 IsTouchWindow(m_hWnd, NULL)) { | 1378 IsTouchWindow(m_hWnd, NULL)) { |
| 1379 UnregisterTouchWindow(m_hWnd); | 1379 UnregisterTouchWindow(m_hWnd); |
| 1380 } | 1380 } |
| 1381 | 1381 |
| 1382 CleanupCompositorWindow(); | 1382 CleanupCompositorWindow(); |
| 1383 | 1383 |
| 1384 ResetTooltip(); | 1384 ResetTooltip(); |
| 1385 TrackMouseLeave(false); | 1385 TrackMouseLeave(false); |
| (...skipping 1764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3150 void RenderWidgetHostViewWin::ResetPointerDownContext() { | 3150 void RenderWidgetHostViewWin::ResetPointerDownContext() { |
| 3151 // If the default focus on the page is on an edit field and we did not | 3151 // If the default focus on the page is on an edit field and we did not |
| 3152 // receive a focus change in the context of a pointer down message, it means | 3152 // receive a focus change in the context of a pointer down message, it means |
| 3153 // that the pointer down message occurred on the edit field and we should | 3153 // that the pointer down message occurred on the edit field and we should |
| 3154 // display the on screen keyboard | 3154 // display the on screen keyboard |
| 3155 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) | 3155 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) |
| 3156 DisplayOnScreenKeyboardIfNeeded(); | 3156 DisplayOnScreenKeyboardIfNeeded(); |
| 3157 received_focus_change_after_pointer_down_ = false; | 3157 received_focus_change_after_pointer_down_ = false; |
| 3158 pointer_down_context_ = false; | 3158 pointer_down_context_ = false; |
| 3159 } | 3159 } |
| OLD | NEW |