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_base.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "content/browser/accessibility/browser_accessibility_manager.h" | 8 #include "content/browser/accessibility/browser_accessibility_manager.h" |
9 #include "content/browser/renderer_host/basic_mouse_wheel_smooth_scroll_gesture.
h" | 9 #include "content/browser/renderer_host/basic_mouse_wheel_smooth_scroll_gesture.
h" |
10 #include "content/browser/renderer_host/render_process_host_impl.h" | 10 #include "content/browser/renderer_host/render_process_host_impl.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 iter->AddWindow(parent); | 77 iter->AddWindow(parent); |
78 return; | 78 return; |
79 } | 79 } |
80 } | 80 } |
81 | 81 |
82 if (found_starting_plugin_process) { | 82 if (found_starting_plugin_process) { |
83 // A plugin process has started but we don't have its handle yet. Since | 83 // A plugin process has started but we don't have its handle yet. Since |
84 // it's most likely the one for this plugin, try a few more times after a | 84 // it's most likely the one for this plugin, try a few more times after a |
85 // delay. | 85 // delay. |
86 if (tries > 0) { | 86 if (tries > 0) { |
87 MessageLoop::current()->PostDelayedTask( | 87 base::MessageLoop::current()->PostDelayedTask( |
88 FROM_HERE, | 88 FROM_HERE, |
89 base::Bind(&NotifyPluginProcessHostHelper, window, parent, tries - 1), | 89 base::Bind(&NotifyPluginProcessHostHelper, window, parent, tries - 1), |
90 base::TimeDelta::FromMilliseconds(kTryDelayMs)); | 90 base::TimeDelta::FromMilliseconds(kTryDelayMs)); |
91 return; | 91 return; |
92 } | 92 } |
93 } | 93 } |
94 | 94 |
95 // The plugin process might have died in the time to execute the task, don't | 95 // The plugin process might have died in the time to execute the task, don't |
96 // leak the HWND. | 96 // leak the HWND. |
97 PostMessage(parent, WM_CLOSE, 0, 0); | 97 PostMessage(parent, WM_CLOSE, 0, 0); |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 if (GetRenderWidgetHost()) | 509 if (GetRenderWidgetHost()) |
510 impl = RenderWidgetHostImpl::From(GetRenderWidgetHost()); | 510 impl = RenderWidgetHostImpl::From(GetRenderWidgetHost()); |
511 if (!impl) | 511 if (!impl) |
512 return; | 512 return; |
513 RenderProcessHostImpl* render_process_host = | 513 RenderProcessHostImpl* render_process_host = |
514 static_cast<RenderProcessHostImpl*>(impl->GetProcess()); | 514 static_cast<RenderProcessHostImpl*>(impl->GetProcess()); |
515 render_process_host->EndFrameSubscription(impl->GetRoutingID()); | 515 render_process_host->EndFrameSubscription(impl->GetRoutingID()); |
516 } | 516 } |
517 | 517 |
518 } // namespace content | 518 } // namespace content |
OLD | NEW |